diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2024-02-13 22:04:59 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-02-15 22:07:39 +0100 |
commit | 4b99e735a5c6cb3c8b23fba522cb1d24a1679f94 (patch) | |
tree | 7e1eb347a2d5c0c6cf7e8124a424ee3d2356655f | |
parent | 533535afc079b745ae8a5fd06afd2ba51b3495fe (diff) | |
download | linux-stable-4b99e735a5c6cb3c8b23fba522cb1d24a1679f94.tar.gz linux-stable-4b99e735a5c6cb3c8b23fba522cb1d24a1679f94.tar.bz2 linux-stable-4b99e735a5c6cb3c8b23fba522cb1d24a1679f94.zip |
x86/ioapic: Simplify setup_ioapic_ids_from_mpc_nocheck()
No need to go through APIC callbacks. It's already established that this is
an ancient APIC. So just copy the present mask and use the direct physid*
functions all over the place.
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.181901887@linutronix.de
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 8dc91d075b6b..6285d880a64c 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -1471,7 +1471,7 @@ static void __init setup_ioapic_ids_from_mpc_nocheck(void) * This is broken; anything with a real cpu count has to * circumvent this idiocy regardless. */ - apic->ioapic_phys_id_map(&phys_cpu_present_map, &phys_id_present_map); + phys_id_present_map = phys_cpu_present_map; /* * Set the IOAPIC ID to the value stored in the MPC table. @@ -1496,8 +1496,7 @@ static void __init setup_ioapic_ids_from_mpc_nocheck(void) * system must have a unique ID or we get lots of nice * 'stuck on smp_invalidate_needed IPI wait' messages. */ - if (apic->check_apicid_used(&phys_id_present_map, - mpc_ioapic_id(ioapic_idx))) { + if (physid_isset(mpc_ioapic_id(ioapic_idx), phys_id_present_map)) { pr_err(FW_BUG "IO-APIC#%d ID %d is already used!...\n", ioapic_idx, mpc_ioapic_id(ioapic_idx)); for (i = 0; i < broadcast_id; i++) |