]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: use x2apic id reported by cpuid during topology discovery
authorSuresh Siddha <suresh.b.siddha@intel.com>
Sat, 23 Aug 2008 15:47:11 +0000 (17:47 +0200)
committerIngo Molnar <mingo@elte.hu>
Sat, 23 Aug 2008 15:47:11 +0000 (17:47 +0200)
use x2apic id reported by cpuid during topology discovery, instead of the
apic id configured in the APIC. For most of the systems, x2apic id
reported by cpuid leaf 0xb will be same as the physical apic id reported
by the APIC_ID register of the APIC. We follow the suggested guidelines
and use the apic id reported by the cpuid.

No change to non-generic UV platforms, will use the apic id reported in the
APIC_ID register as the cpuid reported apic id's may not be unique.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/genx2apic_cluster.c
arch/x86/kernel/genx2apic_phys.c

index ef3f3182d50a4fd6200663eb75768b0396805915..0bf0a8624b8c4ba5262e04a20f5240c24c9d7298 100644 (file)
@@ -120,14 +120,9 @@ static unsigned long set_apic_id(unsigned int id)
        return x;
 }
 
-static unsigned int x2apic_read_id(void)
-{
-       return apic_read(APIC_ID);
-}
-
 static unsigned int phys_pkg_id(int index_msb)
 {
-       return x2apic_read_id() >> index_msb;
+       return current_cpu_data.initial_apicid >> index_msb;
 }
 
 static void x2apic_send_IPI_self(int vector)
index 3229c68aedd43f87deac13ac3c6fd823e5087996..e2401ab0c46e01c6b25dcdd92ff9a0955874ab13 100644 (file)
@@ -118,14 +118,9 @@ static unsigned long set_apic_id(unsigned int id)
        return x;
 }
 
-static unsigned int x2apic_read_id(void)
-{
-       return apic_read(APIC_ID);
-}
-
 static unsigned int phys_pkg_id(int index_msb)
 {
-       return x2apic_read_id() >> index_msb;
+       return current_cpu_data.initial_apicid >> index_msb;
 }
 
 void x2apic_send_IPI_self(int vector)