]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
x86/apic: Mop up early_per_cpu() abuse
authorThomas Gleixner <tglx@linutronix.de>
Tue, 8 Aug 2023 22:03:54 +0000 (15:03 -0700)
committerDave Hansen <dave.hansen@linux.intel.com>
Wed, 9 Aug 2023 18:58:24 +0000 (11:58 -0700)
UV X2APIC uses the per CPU variable from:

  native_smp_prepare_cpus()
    uv_system_init()
      uv_system_init_hub()

which is long after the per CPU areas have been set up.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Michael Kelley <mikelley@microsoft.com>
Tested-by: Sohil Mehta <sohil.mehta@intel.com>
Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
arch/x86/kernel/apic/x2apic_uv_x.c

index 0d812fdc9b25c264b6f58d5240f202c7c5348992..8b14451611d431d8f9d5d300019b386d8b2a30ae 100644 (file)
@@ -1843,7 +1843,7 @@ static void __init uv_system_init_hub(void)
 
        /* Initialize per CPU info: */
        for_each_possible_cpu(cpu) {
-               int apicid = early_per_cpu(x86_cpu_to_apicid, cpu);
+               int apicid = per_cpu(x86_cpu_to_apicid, cpu);
                unsigned short bid;
                unsigned short pnode;