Module Name:    src
Committed By:   mrg
Date:           Sat Dec  5 08:04:51 UTC 2020

Modified Files:
        src/sys/arch/sparc/sparc: cpu.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.256 -r1.257 src/sys/arch/sparc/sparc/cpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sparc/sparc/cpu.c
diff -u src/sys/arch/sparc/sparc/cpu.c:1.256 src/sys/arch/sparc/sparc/cpu.c:1.257
--- src/sys/arch/sparc/sparc/cpu.c:1.256	Sat Jun 13 20:01:27 2020
+++ src/sys/arch/sparc/sparc/cpu.c	Sat Dec  5 08:04:51 2020
@@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.25
 #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 @@ cpu_attach(struct cpu_softc *sc, int nod
 
 #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);

Reply via email to