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@j.email.ne.jp
MFC after:	3 days
This commit is contained in:
John Baldwin 2017-06-14 13:34:09 +00:00
parent 76f2c27264
commit fecabb72e1

View File

@ -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)