diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2009-06-25 20:35:46 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2009-06-25 20:35:46 +0000 |
| commit | 4e9dba6322bc7959003745dd59d33bc0778a15da (patch) | |
| tree | d8c6fa0c05d5c89fc3e63600deb9ba8a7549730a | |
| parent | 2749b672624c281fb9d4c66b8f9530e480b92020 (diff) | |
Notes
| -rw-r--r-- | sys/amd64/amd64/intr_machdep.c | 10 | ||||
| -rw-r--r-- | sys/amd64/include/intr_machdep.h | 2 | ||||
| -rw-r--r-- | sys/i386/i386/intr_machdep.c | 10 | ||||
| -rw-r--r-- | sys/i386/include/intr_machdep.h | 2 |
4 files changed, 20 insertions, 4 deletions
diff --git a/sys/amd64/amd64/intr_machdep.c b/sys/amd64/amd64/intr_machdep.c index 34820f72abb5..186baf5dca6e 100644 --- a/sys/amd64/amd64/intr_machdep.c +++ b/sys/amd64/amd64/intr_machdep.c @@ -518,4 +518,14 @@ intr_shuffle_irqs(void *arg __unused) } SYSINIT(intr_shuffle_irqs, SI_SUB_SMP, SI_ORDER_SECOND, intr_shuffle_irqs, NULL); +#else +/* + * Always route interrupts to the current processor in the UP case. + */ +u_int +intr_next_cpu(void) +{ + + return (PCPU_GET(apic_id)); +} #endif diff --git a/sys/amd64/include/intr_machdep.h b/sys/amd64/include/intr_machdep.h index bad8bf2c8c5f..6092e6260b20 100644 --- a/sys/amd64/include/intr_machdep.h +++ b/sys/amd64/include/intr_machdep.h @@ -152,9 +152,7 @@ int intr_bind(u_int vector, u_char cpu); int intr_config_intr(int vector, enum intr_trigger trig, enum intr_polarity pol); void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame); -#ifdef SMP u_int intr_next_cpu(void); -#endif struct intsrc *intr_lookup_source(int vector); int intr_register_pic(struct pic *pic); int intr_register_source(struct intsrc *isrc); diff --git a/sys/i386/i386/intr_machdep.c b/sys/i386/i386/intr_machdep.c index eedc682d812a..a5c7d000bcc9 100644 --- a/sys/i386/i386/intr_machdep.c +++ b/sys/i386/i386/intr_machdep.c @@ -491,4 +491,14 @@ intr_shuffle_irqs(void *arg __unused) } SYSINIT(intr_shuffle_irqs, SI_SUB_SMP, SI_ORDER_SECOND, intr_shuffle_irqs, NULL); +#else +/* + * Always route interrupts to the current processor in the UP case. + */ +u_int +intr_next_cpu(void) +{ + + return (PCPU_GET(apic_id)); +} #endif diff --git a/sys/i386/include/intr_machdep.h b/sys/i386/include/intr_machdep.h index 052f9bd917f4..aa026b642306 100644 --- a/sys/i386/include/intr_machdep.h +++ b/sys/i386/include/intr_machdep.h @@ -139,9 +139,7 @@ int intr_bind(u_int vector, u_char cpu); int intr_config_intr(int vector, enum intr_trigger trig, enum intr_polarity pol); void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame); -#ifdef SMP u_int intr_next_cpu(void); -#endif struct intsrc *intr_lookup_source(int vector); int intr_register_pic(struct pic *pic); int intr_register_source(struct intsrc *isrc); |
