1/* 2 * This header was generated from the Linux kernel headers by update_headers.py, 3 * to provide necessary information from kernel to userspace, such as constants, 4 * structures, and macros, and thus, contains no copyrightable information. 5 */ 6#ifndef _UAPI_MISC_OCXL_H 7#define _UAPI_MISC_OCXL_H 8#include <linux/types.h> 9#include <linux/ioctl.h> 10enum ocxl_event_type { 11 OCXL_AFU_EVENT_XSL_FAULT_ERROR = 0, 12}; 13#define OCXL_KERNEL_EVENT_FLAG_LAST 0x0001 14struct ocxl_kernel_event_header { 15 __u16 type; 16 __u16 flags; 17 __u32 reserved; 18}; 19struct ocxl_kernel_event_xsl_fault_error { 20 __u64 addr; 21 __u64 dsisr; 22 __u64 count; 23 __u64 reserved; 24}; 25struct ocxl_ioctl_attach { 26 __u64 amr; 27 __u64 reserved1; 28 __u64 reserved2; 29 __u64 reserved3; 30}; 31struct ocxl_ioctl_metadata { 32 __u16 version; 33 34 __u8 afu_version_major; 35 __u8 afu_version_minor; 36 __u32 pasid; 37 __u64 pp_mmio_size; 38 __u64 global_mmio_size; 39 40 __u64 reserved[13]; 41}; 42struct ocxl_ioctl_p9_wait { 43 __u16 thread_id; 44 __u16 reserved1; 45 __u32 reserved2; 46 __u64 reserved3[3]; 47}; 48#define OCXL_IOCTL_FEATURES_FLAGS0_P9_WAIT 0x01 49struct ocxl_ioctl_features { 50 __u64 flags[4]; 51}; 52struct ocxl_ioctl_irq_fd { 53 __u64 irq_offset; 54 __s32 eventfd; 55 __u32 reserved; 56}; 57#define OCXL_MAGIC 0xCA 58#define OCXL_IOCTL_ATTACH _IOW(OCXL_MAGIC, 0x10, struct ocxl_ioctl_attach) 59#define OCXL_IOCTL_IRQ_ALLOC _IOR(OCXL_MAGIC, 0x11, __u64) 60#define OCXL_IOCTL_IRQ_FREE _IOW(OCXL_MAGIC, 0x12, __u64) 61#define OCXL_IOCTL_IRQ_SET_FD _IOW(OCXL_MAGIC, 0x13, struct ocxl_ioctl_irq_fd) 62#define OCXL_IOCTL_GET_METADATA _IOR(OCXL_MAGIC, 0x14, struct ocxl_ioctl_metadata) 63#define OCXL_IOCTL_ENABLE_P9_WAIT _IOR(OCXL_MAGIC, 0x15, struct ocxl_ioctl_p9_wait) 64#define OCXL_IOCTL_GET_FEATURES _IOR(OCXL_MAGIC, 0x16, struct ocxl_ioctl_features) 65#endif 66