Module Name: src
Committed By: fcambus
Date: Fri Aug 7 14:20:08 UTC 2020
Modified Files:
src/sys/arch/alpha/alpha: cpu.c
src/sys/arch/sparc64/sparc64: cpu.c
Log Message:
Use CPU_IS_PRIMARY macro on alpha and sparc64.
To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/alpha/alpha/cpu.c
cvs rdiff -u -r1.137 -r1.138 src/sys/arch/sparc64/sparc64/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.97 src/sys/arch/alpha/alpha/cpu.c:1.98
--- src/sys/arch/alpha/alpha/cpu.c:1.97 Mon Apr 8 00:47:21 2019
+++ src/sys/arch/alpha/alpha/cpu.c Fri Aug 7 14:20:08 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.97 2019/04/08 00:47:21 thorpej Exp $ */
+/* $NetBSD: cpu.c,v 1.98 2020/08/07 14:20:08 fcambus Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 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.97 2019/04/08 00:47:21 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.98 2020/08/07 14:20:08 fcambus Exp $");
#include "opt_ddb.h"
#include "opt_multiprocessor.h"
@@ -408,7 +408,7 @@ cpu_boot_secondary_processors(void)
ci = cpu_info[i];
if (ci == NULL || ci->ci_data.cpu_idlelwp == NULL)
continue;
- if (ci->ci_flags & CPUF_PRIMARY)
+ if (CPU_IS_PRIMARY(ci))
continue;
if ((cpus_booted & (1UL << i)) == 0)
continue;
Index: src/sys/arch/sparc64/sparc64/cpu.c
diff -u src/sys/arch/sparc64/sparc64/cpu.c:1.137 src/sys/arch/sparc64/sparc64/cpu.c:1.138
--- src/sys/arch/sparc64/sparc64/cpu.c:1.137 Mon Dec 30 06:54:31 2019
+++ src/sys/arch/sparc64/sparc64/cpu.c Fri Aug 7 14:20:08 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.137 2019/12/30 06:54:31 macallan Exp $ */
+/* $NetBSD: cpu.c,v 1.138 2020/08/07 14:20:08 fcambus Exp $ */
/*
* Copyright (c) 1996
@@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.137 2019/12/30 06:54:31 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.138 2020/08/07 14:20:08 fcambus Exp $");
#include "opt_multiprocessor.h"
@@ -503,7 +503,7 @@ cpu_attach(device_t parent, device_t dev
* For other cpus, we need to call mi_cpu_attach()
* and complete setting up cpcb.
*/
- if (ci->ci_flags & CPUF_PRIMARY) {
+ if (CPU_IS_PRIMARY(ci)) {
fpstate_cache = pool_cache_init(sizeof(struct fpstate64),
SPARC64_BLOCK_SIZE, 0, 0, "fpstate",
NULL, IPL_NONE, NULL, NULL, NULL);