diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2021-07-20 07:53:40 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2021-07-20 07:53:40 +0000 |
commit | 7e497cb1fa8938755e6ab2274d178e78355de314 (patch) | |
tree | fac10090644a173dbd8a5392355eda2ce9d5f71b /sys | |
parent | 92eb1619eb7b7339e678d1960173ace5bad31eb3 (diff) |
Remove bogus use of CPU_MAXID and get cpu_info only once.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/mips64/mips64/ipifuncs.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/mips64/mips64/ipifuncs.c b/sys/arch/mips64/mips64/ipifuncs.c index d7f73a056c6..c23a12948d4 100644 --- a/sys/arch/mips64/mips64/ipifuncs.c +++ b/sys/arch/mips64/mips64/ipifuncs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipifuncs.c,v 1.22 2020/08/10 15:22:53 visa Exp $ */ +/* $OpenBSD: ipifuncs.c,v 1.23 2021/07/20 07:53:39 visa Exp $ */ /* $NetBSD: ipifuncs.c,v 1.40 2008/04/28 20:23:10 martin Exp $ */ /*- @@ -126,9 +126,11 @@ static void do_send_ipi(unsigned int cpuid, unsigned int ipimask) { #ifdef DEBUG - if (cpuid >= CPU_MAXID || get_cpu_info(cpuid) == NULL) + struct cpu_info *ci = get_cpu_info(cpuid); + + if (ci == NULL) panic("mips_send_ipi: bogus cpu_id"); - if (!cpuset_isset(&cpus_running, get_cpu_info(cpuid))) + if (!cpuset_isset(&cpus_running, ci)) panic("mips_send_ipi: CPU %u not running", cpuid); #endif |