svn commit: r319942 - head/sys/x86/x86
John Baldwin
jhb at FreeBSD.org
Wed Jun 14 13:34:11 UTC 2017
Author: jhb
Date: Wed Jun 14 13:34:09 2017
New Revision: 319942
URL: https://svnweb.freebsd.org/changeset/base/319942
Log:
Don't try to assign interrupts to a CPU on single-CPU systems.
All interrupts are routed to the sole CPU in that case implicitly.
This is a regression in EARLY_AP_STARTUP. Previously the 'assign_cpu'
variable was only set when a multi-CPU system finished booting, so
it's value both meant that interrupts could be assigned and that
there was more than one CPU.
PR: 219882
Reported by: ota at j.email.ne.jp
MFC after: 3 days
Modified:
head/sys/x86/x86/intr_machdep.c
Modified: head/sys/x86/x86/intr_machdep.c
==============================================================================
--- head/sys/x86/x86/intr_machdep.c Wed Jun 14 13:23:40 2017 (r319941)
+++ head/sys/x86/x86/intr_machdep.c Wed Jun 14 13:34:09 2017 (r319942)
@@ -312,7 +312,9 @@ intr_assign_cpu(void *arg, int cpu)
#ifdef EARLY_AP_STARTUP
MPASS(mp_ncpus == 1 || smp_started);
- if (cpu != NOCPU) {
+
+ /* Nothing to do if there is only a single CPU. */
+ if (mp_ncpus > 1 && cpu != NOCPU) {
#else
/*
* Don't do anything during early boot. We will pick up the
@@ -500,6 +502,8 @@ intr_next_cpu(void)
#ifdef EARLY_AP_STARTUP
MPASS(mp_ncpus == 1 || smp_started);
+ if (mp_ncpus == 1)
+ return (PCPU_GET(apic_id));
#else
/* Leave all interrupts on the BSP during boot. */
if (!assign_cpu)
More information about the svn-src-all
mailing list