Module Name: src Committed By: thorpej Date: Wed Mar 6 07:22:45 UTC 2024
Modified Files: src/sys/arch/alpha/alpha: cpu.c Log Message: Statically initialize the PRIMARY and RUNNING flags in cpu_info_primary. To generate a diff of this commit: cvs rdiff -u -r1.107 -r1.108 src/sys/arch/alpha/alpha/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/alpha/alpha/cpu.c diff -u src/sys/arch/alpha/alpha/cpu.c:1.107 src/sys/arch/alpha/alpha/cpu.c:1.108 --- src/sys/arch/alpha/alpha/cpu.c:1.107 Sun May 22 11:27:33 2022 +++ src/sys/arch/alpha/alpha/cpu.c Wed Mar 6 07:22:45 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.107 2022/05/22 11:27:33 andvar Exp $ */ +/* $NetBSD: cpu.c,v 1.108 2024/03/06 07:22:45 thorpej Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001, 2020 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.107 2022/05/22 11:27:33 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.108 2024/03/06 07:22:45 thorpej Exp $"); #include "opt_ddb.h" #include "opt_multiprocessor.h" @@ -82,7 +82,8 @@ __KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.10 #include <machine/alpha.h> struct cpu_info cpu_info_primary __cacheline_aligned = { - .ci_curlwp = &lwp0 + .ci_curlwp = &lwp0, + .ci_flags = CPUF_PRIMARY|CPUF_RUNNING, }; struct cpu_info *cpu_info_list __read_mostly = &cpu_info_primary; @@ -450,7 +451,8 @@ cpuattach(device_t parent, device_t self if (primary) { cpu_announce_extensions(ci); #if defined(MULTIPROCESSOR) - ci->ci_flags |= CPUF_PRIMARY|CPUF_RUNNING; + KASSERT(ci->ci_flags & CPUF_PRIMARY); + KASSERT(ci->ci_flags & CPUF_RUNNING); atomic_or_ulong(&cpus_booted, (1UL << ma->ma_slot)); atomic_or_ulong(&cpus_running, (1UL << ma->ma_slot)); #endif /* MULTIPROCESSOR */