diff options
author | attilio <attilio@FreeBSD.org> | 2012-04-09 22:41:19 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2012-04-09 22:41:19 +0000 |
commit | 6c01a6d7fd218fbd83c25a6a4a81cf532489da2f (patch) | |
tree | eee2c5b0bbf160fa0523eb81c6509cef545d6df8 /sys/amd64 | |
parent | 4360dc9ca8555becc727525f4819e22cdc287502 (diff) | |
download | FreeBSD-src-6c01a6d7fd218fbd83c25a6a4a81cf532489da2f.zip FreeBSD-src-6c01a6d7fd218fbd83c25a6a4a81cf532489da2f.tar.gz |
BSP is not added to the mask of valid target CPUs for interrupts
in set_apic_interrupt_ids(). Besides, set_apic_interrupts_ids() is not
called in the !SMP case too.
Fix this by:
- Adding the BSP as an interrupt target directly in cpu_startup().
- Remove an obsolete optimization where the BSP are skipped in
set_apic_interrupt_ids().
Reported by: jh
Reviewed by: jhb
MFC after: 3 days
X-MFC: r233961
Pointy hat to: me
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/machdep.c | 5 | ||||
-rw-r--r-- | sys/amd64/amd64/mp_machdep.c | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index b45adde..9580d79 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -295,6 +295,11 @@ cpu_startup(dummy) vm_pager_bufferinit(); cpu_setregs(); + + /* + * Add BSP as an interrupt target. + */ + intr_add_cpu(0); } /* diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 043d5af..cf36d9e 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -785,8 +785,6 @@ init_secondary(void) * We tell the I/O APIC code about all the CPUs we want to receive * interrupts. If we don't want certain CPUs to receive IRQs we * can simply not tell the I/O APIC code about them in this function. - * We also do not tell it about the BSP since it tells itself about - * the BSP internally to work with UP kernels and on UP machines. */ static void set_interrupt_apic_ids(void) @@ -797,8 +795,6 @@ set_interrupt_apic_ids(void) apic_id = cpu_apic_ids[i]; if (apic_id == -1) continue; - if (cpu_info[apic_id].cpu_bsp) - continue; if (cpu_info[apic_id].cpu_disabled) continue; |