Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc/sparc for boot -1, don't attach more than the...



details:   https://anonhg.NetBSD.org/src/rev/700017469ee4
branches:  trunk
changeset: 978812:700017469ee4
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sat Dec 05 08:04:51 2020 +0000

description:
for boot -1, don't attach more than the boot CPU most others

diffstat:

 sys/arch/sparc/sparc/cpu.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (38 lines):

diff -r 852457d47223 -r 700017469ee4 sys/arch/sparc/sparc/cpu.c
--- a/sys/arch/sparc/sparc/cpu.c        Sat Dec 05 03:42:15 2020 +0000
+++ b/sys/arch/sparc/sparc/cpu.c        Sat Dec 05 08:04:51 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.256 2020/06/13 20:01:27 ad Exp $ */
+/*     $NetBSD: cpu.c,v 1.257 2020/12/05 08:04:51 mrg Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -52,7 +52,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.256 2020/06/13 20:01:27 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.257 2020/12/05 08:04:51 mrg Exp $");
 
 #include "opt_multiprocessor.h"
 #include "opt_lockdebug.h"
@@ -68,6 +68,7 @@
 #include <sys/xcall.h>
 #include <sys/ipi.h>
 #include <sys/cpu.h>
+#include <sys/reboot.h>
 #include <sys/sysctl.h>
 #include <sys/kmem.h>
 
@@ -486,6 +487,11 @@
 
 #if defined(MULTIPROCESSOR)
        if (cpu_attach_count > 1) {
+               if ((boothowto & RB_MD1) != 0) {
+                       aprint_naive("\n");
+                       aprint_normal(": multiprocessor boot disabled\n");
+                       return;
+               }
                cpu_attach_non_boot(sc, cpi, node);
                cpu_init_evcnt(cpi);
                cpu_setup_sysctl(sc);



Home | Main Index | Thread Index | Old Index