Date: Mon, 19 Jun 2017 13:26:39 +0000 (UTC) From: Glen Barber <gjb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320097 - stable/11/sys/x86/x86 Message-ID: <201706191326.v5JDQd7p050152@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706191326.v5JDQd7p050152>