summaryrefslogtreecommitdiff
path: root/sys/include/arch
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-06-20 01:12:10 -0400
committerIan Moffett <ian@osmora.org>2025-06-20 01:16:57 -0400
commit66beb7829271712f6cd2bbe03b38a50c1d953f2c (patch)
treee5a8e9297355251118f02fb344d877b027b6e8f8 /sys/include/arch
parent8688a083ab2d5e2fa0da737724cf12d130b4127f (diff)
kernel/amd64: intr: Add driver specific intr dataexpt
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 <ian@osmora.org>
Diffstat (limited to 'sys/include/arch')
-rw-r--r--sys/include/arch/amd64/intr.h18
1 files changed, 18 insertions, 0 deletions
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;