summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2009-06-25 20:35:46 +0000
committerjhb <jhb@FreeBSD.org>2009-06-25 20:35:46 +0000
commit6d5618d67ce9b5926b533d242ff4e234e0f2a680 (patch)
treed8c6fa0c05d5c89fc3e63600deb9ba8a7549730a /sys/i386
parent62c7ed5cab0bab8691487fa3acb0731ddf5144d6 (diff)
downloadFreeBSD-src-6d5618d67ce9b5926b533d242ff4e234e0f2a680.zip
FreeBSD-src-6d5618d67ce9b5926b533d242ff4e234e0f2a680.tar.gz
Fix kernels compiled without SMP support. Make intr_next_cpu() available
for UP kernels but as a stub that always returns the single CPU's local APIC ID. Reported by: kib
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/intr_machdep.c10
-rw-r--r--sys/i386/include/intr_machdep.h2
2 files changed, 10 insertions, 2 deletions
diff --git a/sys/i386/i386/intr_machdep.c b/sys/i386/i386/intr_machdep.c
index eedc682..a5c7d00 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 052f9bd..aa026b6 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);
OpenPOWER on IntegriCloud