summaryrefslogtreecommitdiff
path: root/sys/include/arch/amd64/intr.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/include/arch/amd64/intr.h')
-rw-r--r--sys/include/arch/amd64/intr.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/sys/include/arch/amd64/intr.h b/sys/include/arch/amd64/intr.h
index 2a8d487..c848b6f 100644
--- a/sys/include/arch/amd64/intr.h
+++ b/sys/include/arch/amd64/intr.h
@@ -47,8 +47,20 @@
#define IPL_CLOCK 2 /* Clock */
#define IPL_HIGH 3 /* Defer everything */
-struct intr_entry {
- int priority;
+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;
+ };
};
/*
@@ -59,11 +71,14 @@ struct intr_entry {
* [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]
* @vector: Interrupt vector [v]
*
+ * XXX: `name' must be null terminated ('\0')
+ *
* XXX: `irq` can be set to -1 for MSI/MSI-X
* interrupts.
*
@@ -76,6 +91,7 @@ struct intr_entry {
*/
struct intr_hand {
int(*func)(void *);
+ struct intr_data data;
char *name;
int priority;
int irq;