Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/sys/arch/x86/x86 Pull up following revision(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/4a5afaa41774
branches:  netbsd-9
changeset: 843765:4a5afaa41774
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Jan 21 11:36:36 2020 +0000

description:
Pull up following revision(s) (requested by pgoyette in ticket #623):

        sys/arch/x86/x86/cpu.c: revision 1.181

If "application processors" were skipped/disabled at boot time (due to
RB_MD1 being set), don't try to examine the featurebus info, since it
was never retrieved.  Addresses kern/54815

XXX pullup-9

diffstat:

 sys/arch/x86/x86/cpu.c |  14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r 49678ea7e729 -r 4a5afaa41774 sys/arch/x86/x86/cpu.c
--- a/sys/arch/x86/x86/cpu.c    Tue Jan 21 11:30:28 2020 +0000
+++ b/sys/arch/x86/x86/cpu.c    Tue Jan 21 11:36:36 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.171 2019/05/29 16:54:41 maxv Exp $   */
+/*     $NetBSD: cpu.c,v 1.171.2.1 2020/01/21 11:36:36 martin Exp $     */
 
 /*
  * Copyright (c) 2000-2012 NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.171 2019/05/29 16:54:41 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.171.2.1 2020/01/21 11:36:36 martin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mpbios.h"                /* for MPDEBUG */
@@ -521,6 +521,16 @@
        struct cpufeature_attach_args cfaa;
        struct cpu_info *ci = sc->sc_info;
 
+       /*
+        * If we booted with RB_MD1 to disable multiprocessor, the
+        * auto-configuration data still contains the additional
+        * CPUs.   But their initialization was mostly bypassed
+        * during attach, so we have to make sure we don't look at
+        * their featurebus info, since it wasn't retrieved.
+        */
+       if (ci == NULL)
+               return 0;
+
        memset(&cfaa, 0, sizeof(cfaa));
        cfaa.ci = ci;
 



Home | Main Index | Thread Index | Old Index