ocxl: Add AFU interrupt support
Add user APIs through ioctl to allocate, free, and be notified of an AFU interrupt. For opencapi, an AFU can trigger an interrupt on the host by sending a specific command targeting a 64-bit object handle. On POWER9, this is implemented by mapping a special page in the address space of a process and a write to that page will trigger an interrupt. Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:

committed by
Michael Ellerman

parent
5ef3166e8a
commit
aeddad1760
@@ -32,9 +32,18 @@ struct ocxl_ioctl_attach {
|
||||
__u64 reserved3;
|
||||
};
|
||||
|
||||
struct ocxl_ioctl_irq_fd {
|
||||
__u64 irq_offset;
|
||||
__s32 eventfd;
|
||||
__u32 reserved;
|
||||
};
|
||||
|
||||
/* ioctl numbers */
|
||||
#define OCXL_MAGIC 0xCA
|
||||
/* AFU devices */
|
||||
#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)
|
||||
|
||||
#endif /* _UAPI_MISC_OCXL_H */
|
||||
|
Reference in New Issue
Block a user