diff options
author | Frederic Barrat <fbarrat@linux.vnet.ibm.com> | 2018-01-23 14:31:42 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-01-24 03:42:58 +0300 |
commit | aeddad1760aeb206d912b27b230269407efd5b06 (patch) | |
tree | e7931bbe8259c93bb8928bf4b95caa4c075e94ed /drivers/misc/ocxl/ocxl_internal.h | |
parent | 5ef3166e8a32d78dfa985a323aa45ed485ff663a (diff) | |
download | linux-aeddad1760aeb206d912b27b230269407efd5b06.tar.xz |
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>
Diffstat (limited to 'drivers/misc/ocxl/ocxl_internal.h')
-rw-r--r-- | drivers/misc/ocxl/ocxl_internal.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/misc/ocxl/ocxl_internal.h b/drivers/misc/ocxl/ocxl_internal.h index 04fc160c7bd5..a89b88ac67eb 100644 --- a/drivers/misc/ocxl/ocxl_internal.h +++ b/drivers/misc/ocxl/ocxl_internal.h @@ -190,4 +190,11 @@ extern void ocxl_context_free(struct ocxl_context *ctx); extern int ocxl_sysfs_add_afu(struct ocxl_afu *afu); extern void ocxl_sysfs_remove_afu(struct ocxl_afu *afu); +extern int ocxl_afu_irq_alloc(struct ocxl_context *ctx, u64 *irq_offset); +extern int ocxl_afu_irq_free(struct ocxl_context *ctx, u64 irq_offset); +extern void ocxl_afu_irq_free_all(struct ocxl_context *ctx); +extern int ocxl_afu_irq_set_fd(struct ocxl_context *ctx, u64 irq_offset, + int eventfd); +extern u64 ocxl_afu_irq_get_addr(struct ocxl_context *ctx, u64 irq_offset); + #endif /* _OCXL_INTERNAL_H_ */ |