use kcpuset_isset() and pass second (NULL) argument to mips_fixup_exceptions()
to fix build for GENERIC(64).MP kernel configs.
This commit is contained in:
parent
aa3d1fe6ec
commit
4e37e4be86
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cpu.c,v 1.23 2016/07/21 17:02:15 christos Exp $ */
|
||||
/* $NetBSD: cpu.c,v 1.24 2023/12/05 19:19:26 andvar Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2000, 2001
|
||||
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.23 2016/07/21 17:02:15 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.24 2023/12/05 19:19:26 andvar Exp $");
|
||||
|
||||
#include "opt_multiprocessor.h"
|
||||
|
||||
|
@ -150,13 +150,12 @@ cpu_attach(device_t parent, device_t self, void *aux)
|
|||
aprint_error(": CFE call to start failed: %d\n",
|
||||
status);
|
||||
}
|
||||
const u_long cpu_mask = 1L << cpu_index(ci);
|
||||
for (size_t i = 0; i < 10000; i++) {
|
||||
if (cpus_hatched & cpu_mask)
|
||||
if (kcpuset_isset(cpus_hatched, cpu_index(ci)))
|
||||
break;
|
||||
DELAY(100);
|
||||
}
|
||||
if ((cpus_hatched & cpu_mask) == 0) {
|
||||
if (!kcpuset_isset(cpus_hatched, cpu_index(ci))) {
|
||||
aprint_error(": failed to hatch!\n");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.55 2017/11/06 03:47:48 christos Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.56 2023/12/05 19:19:26 andvar Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2000, 2001
|
||||
|
@ -58,7 +58,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.55 2017/11/06 03:47:48 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.56 2023/12/05 19:19:26 andvar Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_execfmt.h"
|
||||
|
@ -319,7 +319,7 @@ mach_init(long fwhandle, long magic, long bootdata, long reserved)
|
|||
}
|
||||
|
||||
#ifdef MULTIPROCESSOR
|
||||
mips_fixup_exceptions(mips_fixup_zero_relative);
|
||||
mips_fixup_exceptions(mips_fixup_zero_relative, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sb1250_icu.c,v 1.14 2016/07/21 17:02:15 christos Exp $ */
|
||||
/* $NetBSD: sb1250_icu.c,v 1.15 2023/12/05 19:19:26 andvar Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2000, 2001
|
||||
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sb1250_icu.c,v 1.14 2016/07/21 17:02:15 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sb1250_icu.c,v 1.15 2023/12/05 19:19:26 andvar Exp $");
|
||||
|
||||
#define __INTR_PRIVATE
|
||||
|
||||
|
@ -179,7 +179,7 @@ sb1250_lsw_send_ipi(struct cpu_info *ci, int tag)
|
|||
struct cpu_softc * const cpu = ci->ci_softc;
|
||||
const uint64_t mbox_mask = 1LLU << tag;
|
||||
|
||||
if (cpus_running & (1 << cpu_index(ci)))
|
||||
if (kcpuset_isset(cpus_running, cpu_index(ci)))
|
||||
WRITE_REG(cpu->sb1cpu_imr_base + R_IMR_MAILBOX_SET_CPU, mbox_mask);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue