diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-05-18 14:02:55 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-05-18 14:02:55 +0000 |
commit | d9e163e0936a12c1cd08ef6ccbabf815817067ad (patch) | |
tree | a7f9b9271b91b93dec27446b239058be24d195fc /sys/kern/kern_intr.c | |
parent | a6c06ba89c3c4501adeea814b78a150e2d129b99 (diff) | |
download | FreeBSD-src-d9e163e0936a12c1cd08ef6ccbabf815817067ad.zip FreeBSD-src-d9e163e0936a12c1cd08ef6ccbabf815817067ad.tar.gz |
Binding interrupts to a CPU consists of two parts: setting up CPU
affinity for the interrupt thread, and requesting that underlying
hardware direct interrupts to the CPU. For software interrupt
threads, implement a no-op interrupt event binder that returns
success, so that the interrupt management code will just set the
ithread's affinity and succeed.
Reviewed by: jhb
MFC after: 1 week
Diffstat (limited to 'sys/kern/kern_intr.c')
-rw-r--r-- | sys/kern/kern_intr.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index f998645..1893f48 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -968,6 +968,18 @@ intr_event_schedule_thread(struct intr_event *ie, struct intr_thread *it) #endif /* + * Allow interrupt event binding for software interrupt handlers -- a no-op, + * since interrupts are generated in software rather than being directed by + * a PIC. + */ +static int +swi_assign_cpu(void *arg, u_char cpu) +{ + + return (0); +} + +/* * Add a software interrupt handler to a specified event. If a given event * is not specified, then a new event is created. */ @@ -988,7 +1000,7 @@ swi_add(struct intr_event **eventp, const char *name, driver_intr_t handler, return (EINVAL); } else { error = intr_event_create(&ie, NULL, IE_SOFT, 0, - NULL, NULL, NULL, NULL, "swi%d:", pri); + NULL, NULL, NULL, swi_assign_cpu, "swi%d:", pri); if (error) return (error); if (eventp != NULL) |