summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/intr_machdep.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2008-03-14 19:41:48 +0000
committerjhb <jhb@FreeBSD.org>2008-03-14 19:41:48 +0000
commit9c113163fb2bb182d320f0228312c13601341163 (patch)
treec7c725651b1ad4c07a8fe93c253676ef3d6d5279 /sys/i386/include/intr_machdep.h
parent33dfb1706b9985093bf2f15b13b6d6fcf86e117f (diff)
downloadFreeBSD-src-9c113163fb2bb182d320f0228312c13601341163.zip
FreeBSD-src-9c113163fb2bb182d320f0228312c13601341163.tar.gz
Add preliminary support for binding interrupts to CPUs:
- Add a new intr_event method ie_assign_cpu() that is invoked when the MI code wishes to bind an interrupt source to an individual CPU. The MD code may reject the binding with an error. If an assign_cpu function is not provided, then the kernel assumes the platform does not support binding interrupts to CPUs and fails all requests to do so. - Bind ithreads to CPUs on their next execution loop once an interrupt event is bound to a CPU. Only shared ithreads are bound. We currently leave private ithreads for drivers using filters + ithreads in the INTR_FILTER case unbound. - A new intr_event_bind() routine is used to bind an interrupt event to a CPU. - Implement binding on amd64 and i386 by way of the existing pic_assign_cpu PIC method. - For x86, provide a 'intr_bind(IRQ, cpu)' wrapper routine that looks up an interrupt source and binds its interrupt event to the specified CPU. MI code can currently (ab)use this by doing: intr_bind(rman_get_start(irq_res), cpu); however, I plan to add a truly MI interface (probably a bus_bind_intr(9)) where the implementation in the x86 nexus(4) driver would end up calling intr_bind() internally. Requested by: kmacy, gallatin, jeff Tested on: {amd64, i386} x {regular, INTR_FILTER}
Diffstat (limited to 'sys/i386/include/intr_machdep.h')
-rw-r--r--sys/i386/include/intr_machdep.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/i386/include/intr_machdep.h b/sys/i386/include/intr_machdep.h
index 4e6d070..2aeb0c9 100644
--- a/sys/i386/include/intr_machdep.h
+++ b/sys/i386/include/intr_machdep.h
@@ -133,6 +133,9 @@ void intr_add_cpu(u_int cpu);
#endif
int intr_add_handler(const char *name, int vector, driver_filter_t filter,
driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep);
+#ifdef SMP
+int intr_bind(u_int vector, u_char cpu);
+#endif
int intr_config_intr(int vector, enum intr_trigger trig,
enum intr_polarity pol);
void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame);
OpenPOWER on IntegriCloud