/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
/* Copyright 2017 IBM Corp. */
OCXL_AFU_EVENT_XSL_FAULT_ERROR = 0,
#define OCXL_KERNEL_EVENT_FLAG_LAST 0x0001 /* This is the last event pending */
struct ocxl_kernel_event_header {
struct ocxl_kernel_event_xsl_fault_error {
struct ocxl_ioctl_attach {
struct ocxl_ioctl_metadata {
__u16 version; /* struct version, always backwards compatible */
__u32 pasid; /* PASID assigned to the current context */
__u64 pp_mmio_size; /* Per PASID MMIO size */
/* End version 0 fields */
__u64 reserved[13]; /* Total of 16*u64 */
struct ocxl_ioctl_p9_wait {
__u16 thread_id; /* The thread ID required to wake this thread */
#define OCXL_IOCTL_FEATURES_FLAGS0_P9_WAIT 0x01
struct ocxl_ioctl_features {
struct ocxl_ioctl_irq_fd {
#define OCXL_IOCTL_ATTACH _IOW(OCXL_MAGIC, 0x10, struct ocxl_ioctl_attach)
#define OCXL_IOCTL_IRQ_ALLOC _IOR(OCXL_MAGIC, 0x11, __u64)
#define OCXL_IOCTL_IRQ_FREE _IOW(OCXL_MAGIC, 0x12, __u64)
#define OCXL_IOCTL_IRQ_SET_FD _IOW(OCXL_MAGIC, 0x13, struct ocxl_ioctl_irq_fd)
#define OCXL_IOCTL_GET_METADATA _IOR(OCXL_MAGIC, 0x14, struct ocxl_ioctl_metadata)
#define OCXL_IOCTL_ENABLE_P9_WAIT _IOR(OCXL_MAGIC, 0x15, struct ocxl_ioctl_p9_wait)
#define OCXL_IOCTL_GET_FEATURES _IOR(OCXL_MAGIC, 0x16, struct ocxl_ioctl_features)
#endif /* _MISC_OCXL_H */