aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/smpboot.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2024-02-13 22:05:17 +0100
committerThomas Gleixner <tglx@linutronix.de>2024-02-15 22:07:41 +0100
commit350b5e2730d1e15337a10bd913694ee4527c02f0 (patch)
treee1fb15a289103d2219c4a848ea0a5c2522e1d032 /arch/x86/kernel/smpboot.c
parentx86/mm/numa: Move early mptable evaluation into common code (diff)
downloadlinux-350b5e2730d1e15337a10bd913694ee4527c02f0.tar.gz
linux-350b5e2730d1e15337a10bd913694ee4527c02f0.zip
x86/mpparse: Remove the physid_t bitmap wrapper
physid_t is a wrapper around bitmap. Just remove the onion layer and use bitmap functionality directly. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Michael Kelley <mhklinux@outlook.com> Tested-by: Sohil Mehta <sohil.mehta@intel.com> Link: https://lore.kernel.org/r/20240212154639.994904510@linutronix.de
Diffstat (limited to 'arch/x86/kernel/smpboot.c')
-rw-r--r--arch/x86/kernel/smpboot.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 9cdb056c37b5..000b856db8ce 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1072,7 +1072,7 @@ int native_kick_ap(unsigned int cpu, struct task_struct *tidle)
pr_debug("++++++++++++++++++++=_---CPU UP %u\n", cpu);
- if (apicid == BAD_APICID || !physid_isset(apicid, phys_cpu_present_map) ||
+ if (apicid == BAD_APICID || !test_bit(apicid, phys_cpu_present_map) ||
!apic_id_valid(apicid)) {
pr_err("%s: bad cpu %d\n", __func__, cpu);
return -EINVAL;
@@ -1147,10 +1147,8 @@ static __init void disable_smp(void)
init_cpu_present(cpumask_of(0));
init_cpu_possible(cpumask_of(0));
- if (smp_found_config)
- physid_set_mask_of_physid(boot_cpu_physical_apicid, &phys_cpu_present_map);
- else
- physid_set_mask_of_physid(0, &phys_cpu_present_map);
+ reset_phys_cpu_present_map(smp_found_config ? boot_cpu_physical_apicid : 0);
+
cpumask_set_cpu(0, topology_sibling_cpumask(0));
cpumask_set_cpu(0, topology_core_cpumask(0));
cpumask_set_cpu(0, topology_die_cpumask(0));