Module Name: src Committed By: thorpej Date: Tue Mar 5 20:59:41 UTC 2024
Modified Files: src/sys/kern: init_main.c subr_cpu.c src/sys/sys: cpu.h Log Message: Revert previous until I can diagnose a failure reported by gson. To generate a diff of this commit: cvs rdiff -u -r1.548 -r1.549 src/sys/kern/init_main.c cvs rdiff -u -r1.21 -r1.22 src/sys/kern/subr_cpu.c cvs rdiff -u -r1.53 -r1.54 src/sys/sys/cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/init_main.c diff -u src/sys/kern/init_main.c:1.548 src/sys/kern/init_main.c:1.549 --- src/sys/kern/init_main.c:1.548 Tue Mar 5 14:39:29 2024 +++ src/sys/kern/init_main.c Tue Mar 5 20:59:41 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: init_main.c,v 1.548 2024/03/05 14:39:29 thorpej Exp $ */ +/* $NetBSD: init_main.c,v 1.549 2024/03/05 20:59:41 thorpej Exp $ */ /*- * Copyright (c) 2008, 2009, 2019, 2023 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.548 2024/03/05 14:39:29 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.549 2024/03/05 20:59:41 thorpej Exp $"); #include "opt_cnmagic.h" #include "opt_ddb.h" @@ -275,8 +275,7 @@ main(void) #ifdef DIAGNOSTIC /* * Verify that CPU_INFO_FOREACH() knows about the boot CPU - * and only the boot CPU at this point. The boot CPU should - * also be marked PRIMARY. + * and only the boot CPU at this point. */ int cpucount = 0; for (CPU_INFO_FOREACH(cii, ci)) { @@ -284,12 +283,8 @@ main(void) cpucount++; } KASSERT(cpucount == 1); - KASSERT(CPU_IS_PRIMARY(curcpu())); #endif - /* Stash a pointer to the boot CPU for quick reference wheen needed. */ - boot_cpu = curcpu(); - l = &lwp0; #ifndef LWP0_CPU_INFO l->l_cpu = curcpu(); Index: src/sys/kern/subr_cpu.c diff -u src/sys/kern/subr_cpu.c:1.21 src/sys/kern/subr_cpu.c:1.22 --- src/sys/kern/subr_cpu.c:1.21 Tue Mar 5 14:39:29 2024 +++ src/sys/kern/subr_cpu.c Tue Mar 5 20:59:41 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_cpu.c,v 1.21 2024/03/05 14:39:29 thorpej Exp $ */ +/* $NetBSD: subr_cpu.c,v 1.22 2024/03/05 20:59:41 thorpej Exp $ */ /*- * Copyright (c) 2007, 2008, 2009, 2010, 2012, 2019, 2020 @@ -61,7 +61,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: subr_cpu.c,v 1.21 2024/03/05 14:39:29 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_cpu.c,v 1.22 2024/03/05 20:59:41 thorpej Exp $"); #include <sys/param.h> #include <sys/atomic.h> @@ -86,9 +86,6 @@ int64_t cpu_counts[CPU_COUNT_MAX]; /* An array of CPUs. There are ncpu entries. */ struct cpu_info **cpu_infos __read_mostly; -/* A pointer to the boot CPU, for quick reference when needed. */ -struct cpu_info *boot_cpu __read_mostly; - /* Note: set on mi_cpu_attach() and idle_loop(). */ kcpuset_t * kcpuset_attached __read_mostly = NULL; kcpuset_t * kcpuset_running __read_mostly = NULL; Index: src/sys/sys/cpu.h diff -u src/sys/sys/cpu.h:1.53 src/sys/sys/cpu.h:1.54 --- src/sys/sys/cpu.h:1.53 Tue Mar 5 14:39:29 2024 +++ src/sys/sys/cpu.h Tue Mar 5 20:59:41 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.53 2024/03/05 14:39:29 thorpej Exp $ */ +/* $NetBSD: cpu.h,v 1.54 2024/03/05 20:59:41 thorpej Exp $ */ /*- * Copyright (c) 2007 YAMAMOTO Takashi, @@ -100,7 +100,6 @@ void cpu_topology_init(void); extern kmutex_t cpu_lock; extern u_int maxcpus; extern struct cpu_info **cpu_infos; -extern struct cpu_info *boot_cpu; extern kcpuset_t *kcpuset_attached; extern kcpuset_t *kcpuset_running;