summaryrefslogtreecommitdiffstats
path: root/sys/sys/intr.h
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2016-06-03 10:13:18 +0000
committerandrew <andrew@FreeBSD.org>2016-06-03 10:13:18 +0000
commit120a010498079d934ace3e789561c8fa5f8d692b (patch)
tree2c30a3c450b82e634860315d9edd7bf8825e7250 /sys/sys/intr.h
parent2665e75b584904d0af0ad5b76360e0f1b363b328 (diff)
downloadFreeBSD-src-120a010498079d934ace3e789561c8fa5f8d692b.zip
FreeBSD-src-120a010498079d934ace3e789561c8fa5f8d692b.tar.gz
Add an interface to handle interrupt controllers that have a contiguous
range of interrupts they pass to a second controller driver to handle. The parent driver is expected to detect when one of these interrupts has been triggered and call intr_child_irq_handler to pass the interrupt to a child. The children controllers are then expected to manage the range by allocating interrupts as needed. This will initially be used by the ARM GICv3 driver, but is is expected to be useful for other driver where this type of allocation applies. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6436
Diffstat (limited to 'sys/sys/intr.h')
-rw-r--r--sys/sys/intr.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/sys/intr.h b/sys/sys/intr.h
index 3d75efd..8318e70 100644
--- a/sys/sys/intr.h
+++ b/sys/sys/intr.h
@@ -74,6 +74,7 @@ typedef int intr_irq_filter_t(void *arg, struct trapframe *tf);
#else
typedef int intr_irq_filter_t(void *arg);
#endif
+typedef int intr_child_irq_filter_t(void *arg, uintptr_t irq);
#define INTR_ISRC_NAMELEN (MAXCOMLEN + 1)
@@ -81,6 +82,8 @@ typedef int intr_irq_filter_t(void *arg);
#define INTR_ISRCF_PPI 0x02 /* PPI interrupt */
#define INTR_ISRCF_BOUND 0x04 /* bound to a CPU */
+struct intr_pic;
+
/* Interrupt source definition. */
struct intr_irqsrc {
device_t isrc_dev; /* where isrc is mapped */
@@ -113,6 +116,8 @@ u_int intr_irq_next_cpu(u_int current_cpu, cpuset_t *cpumask);
struct intr_pic *intr_pic_register(device_t, intptr_t);
int intr_pic_deregister(device_t, intptr_t);
int intr_pic_claim_root(device_t, intptr_t, intr_irq_filter_t *, void *, u_int);
+struct intr_pic *intr_pic_add_handler(device_t, struct intr_pic *,
+ intr_child_irq_filter_t *, void *, uintptr_t, uintptr_t);
extern device_t intr_irq_root_dev;
@@ -127,6 +132,7 @@ int intr_setup_irq(device_t, struct resource *, driver_filter_t, driver_intr_t,
int intr_teardown_irq(device_t, struct resource *, void *);
int intr_describe_irq(device_t, struct resource *, void *, const char *);
+int intr_child_irq_handler(struct intr_pic *, uintptr_t);
/* MSI/MSI-X handling */
int intr_msi_register(device_t, intptr_t);
OpenPOWER on IntegriCloud