diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2021-07-24 08:21:14 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2021-07-24 08:21:14 +0000 |
commit | 355a181f87e40a5e5fa65ee6cd9c5aebdd15bf03 (patch) | |
tree | 27705794d05663f326e8a0fa8faca9243adb4865 /sys/arch/mips64 | |
parent | 9a3087d51dd0d90e1aca7018ce0d28dd8f7ddf88 (diff) |
Replace cpus_running with CPU_IS_RUNNING().
Diffstat (limited to 'sys/arch/mips64')
-rw-r--r-- | sys/arch/mips64/include/cpu.h | 3 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/cpu.c | 6 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/ipifuncs.c | 9 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/pmap.c | 6 |
4 files changed, 9 insertions, 15 deletions
diff --git a/sys/arch/mips64/include/cpu.h b/sys/arch/mips64/include/cpu.h index 57aa201089a..d3831070284 100644 --- a/sys/arch/mips64/include/cpu.h +++ b/sys/arch/mips64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.135 2021/07/06 09:34:06 kettenis Exp $ */ +/* $OpenBSD: cpu.h,v 1.136 2021/07/24 08:21:13 visa Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -228,7 +228,6 @@ extern struct cpu_info *get_cpu_info(int); #define CPU_IS_RUNNING(ci) ((ci)->ci_flags & CPUF_RUNNING) #define cpu_number() (curcpu()->ci_cpuid) -extern struct cpuset cpus_running; void cpu_unidle(struct cpu_info *); void cpu_boot_secondary_processors(void); #define cpu_boot_secondary(ci) hw_cpu_boot_secondary(ci) diff --git a/sys/arch/mips64/mips64/cpu.c b/sys/arch/mips64/mips64/cpu.c index 2d1998c1165..9b818c040c3 100644 --- a/sys/arch/mips64/mips64/cpu.c +++ b/sys/arch/mips64/mips64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.79 2021/05/28 16:33:36 visa Exp $ */ +/* $OpenBSD: cpu.c,v 1.80 2021/07/24 08:21:13 visa Exp $ */ /* * Copyright (c) 1997-2004 Opsycon AB (www.opsycon.se) @@ -45,9 +45,6 @@ void cpuattach(struct device *, struct device *, void *); struct cpu_info cpu_info_primary; struct cpu_info *cpu_info_list = &cpu_info_primary; struct cpu_info *cpu_info_secondaries; -#ifdef MULTIPROCESSOR -struct cpuset cpus_running; -#endif extern void cpu_idle_cycle_nop(void); extern void cpu_idle_cycle_wait(void); @@ -90,7 +87,6 @@ cpuattach(struct device *parent, struct device *dev, void *aux) ci = &cpu_info_primary; #ifdef MULTIPROCESSOR ci->ci_flags |= CPUF_RUNNING | CPUF_PRESENT | CPUF_PRIMARY; - cpuset_add(&cpus_running, ci); if (ncpusfound > 1) { cpu_info_secondaries = (struct cpu_info *) alloc_contiguous_pages(sizeof(struct cpu_info) * diff --git a/sys/arch/mips64/mips64/ipifuncs.c b/sys/arch/mips64/mips64/ipifuncs.c index c23a12948d4..ea0eb72abaa 100644 --- a/sys/arch/mips64/mips64/ipifuncs.c +++ b/sys/arch/mips64/mips64/ipifuncs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipifuncs.c,v 1.23 2021/07/20 07:53:39 visa Exp $ */ +/* $OpenBSD: ipifuncs.c,v 1.24 2021/07/24 08:21:13 visa Exp $ */ /* $NetBSD: ipifuncs.c,v 1.40 2008/04/28 20:23:10 martin Exp $ */ /*- @@ -130,8 +130,8 @@ do_send_ipi(unsigned int cpuid, unsigned int ipimask) if (ci == NULL) panic("mips_send_ipi: bogus cpu_id"); - if (!cpuset_isset(&cpus_running, ci)) - panic("mips_send_ipi: CPU %u not running", cpuid); + if (!CPU_IS_RUNNING(ci)) + panic("mips_send_ipi: CPU %u not running", cpuid); #endif atomic_setbits_int(&ipi_mailbox[cpuid], ipimask); @@ -172,8 +172,7 @@ mips64_multicast_ipi(unsigned int cpumask, unsigned int ipimask) membar_producer(); CPU_INFO_FOREACH(cii, ci) { - if (!(cpumask & (1UL << ci->ci_cpuid)) || - !cpuset_isset(&cpus_running, ci)) + if (!(cpumask & (1UL << ci->ci_cpuid)) || !CPU_IS_RUNNING(ci)) continue; do_send_ipi(ci->ci_cpuid, ipimask); } diff --git a/sys/arch/mips64/mips64/pmap.c b/sys/arch/mips64/mips64/pmap.c index 986bea417df..23fbd162bd2 100644 --- a/sys/arch/mips64/mips64/pmap.c +++ b/sys/arch/mips64/mips64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.118 2021/05/05 15:29:19 visa Exp $ */ +/* $OpenBSD: pmap.c,v 1.119 2021/07/24 08:21:13 visa Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -250,7 +250,7 @@ pmap_invalidate_icache(pmap_t pmap, vaddr_t va, pt_entry_t entry) pmap_swlock(pmap); CPU_INFO_FOREACH(cii, ci) { - if (cpuset_isset(&cpus_running, ci) && + if (CPU_IS_RUNNING(ci) && pmap->pm_asid[ci->ci_cpuid].pma_asidgen != 0) cpumask |= 1ul << ci->ci_cpuid; } @@ -293,7 +293,7 @@ pmap_shootdown_range(pmap_t pmap, vaddr_t sva, vaddr_t eva, int needisync) CPU_INFO_FOREACH(cii, ci) { if (ci == self) continue; - if (!cpuset_isset(&cpus_running, ci)) + if (!CPU_IS_RUNNING(ci)) continue; if (pmap != pmap_kernel()) { if (pmap->pm_asid[ci->ci_cpuid].pma_asidgen != |