From 66beb7829271712f6cd2bbe03b38a50c1d953f2c Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Fri, 20 Jun 2025 01:12:10 -0400 Subject: kernel/amd64: intr: Add driver specific intr data Allow the intr_hand structure to carry driver specific and interrupt related data so that it can be passed to an interrupt handler when it is invoked. Signed-off-by: Ian Moffett --- sys/include/arch/amd64/intr.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'sys/include') diff --git a/sys/include/arch/amd64/intr.h b/sys/include/arch/amd64/intr.h index b640e4b..c848b6f 100644 --- a/sys/include/arch/amd64/intr.h +++ b/sys/include/arch/amd64/intr.h @@ -47,6 +47,22 @@ #define IPL_CLOCK 2 /* Clock */ #define IPL_HIGH 3 /* Defer everything */ +struct intr_hand; + +/* + * Contains information passed to driver + * + * @ihp: Interrupt handler + * @data: Driver specific data + */ +struct intr_data { + struct intr_hand *ihp; + union { + void *data; + uint64_t data_u64; + }; +}; + /* * Interrupt handler * @@ -55,6 +71,7 @@ * [v]: Returned by intr_register() * * @func: The actual handler [r] + * @data: Interrupt data [o/v] * @name: Interrupt name [v] * @priority: Interrupt priority [r] * @irq: Interrupt request number [o] @@ -74,6 +91,7 @@ */ struct intr_hand { int(*func)(void *); + struct intr_data data; char *name; int priority; int irq; -- cgit v1.2.3