Use CPU_IS_PRIMARY macro on alpha and sparc64.

This commit is contained in:
fcambus 2020-08-07 14:20:08 +00:00
parent 174675d6b2
commit a7806f4de1
2 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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, void *aux)
* 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);