svn commit: r320097 - stable/11/sys/x86/x86
Glen Barber
gjb at FreeBSD.org
Mon Jun 19 13:26:40 UTC 2017
Author: gjb
Date: Mon Jun 19 13:26:38 2017
New Revision: 320097
URL: https://svnweb.freebsd.org/changeset/base/320097
Log:
MFC r319942 (jhb):
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
its value both meant that interrupts could be assigned and that
there was more than one CPU.
PR: 219882
Approved by: re (kib)
Sponsored by: The FreeBSD Foundation
Modified:
stable/11/sys/x86/x86/intr_machdep.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/x86/x86/intr_machdep.c
==============================================================================
--- stable/11/sys/x86/x86/intr_machdep.c Mon Jun 19 13:25:47 2017 (r320096)
+++ stable/11/sys/x86/x86/intr_machdep.c Mon Jun 19 13:26:38 2017 (r320097)
@@ -315,7 +315,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
@@ -503,6 +505,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-stable-11
mailing list