aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/genx2apic_phys.c
diff options
context:
space:
mode:
authorSuresh Siddha <suresh.b.siddha@intel.com>2008-08-23 11:47:11 -0400
committerIngo Molnar <mingo@elte.hu>2008-08-23 11:47:11 -0400
commite17941b0c140562d92e5a3bc12b4ad88281c7926 (patch)
tree3bfdc8bf5611da7eb9abb8905dce3a1f17c0926a /arch/x86/kernel/genx2apic_phys.c
parentbbb65d2d365efe9951290e61678dcf81ec60add4 (diff)
x86: use x2apic id reported by cpuid during topology discovery
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>
Diffstat (limited to 'arch/x86/kernel/genx2apic_phys.c')
-rw-r--r--arch/x86/kernel/genx2apic_phys.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/x86/kernel/genx2apic_phys.c b/arch/x86/kernel/genx2apic_phys.c
index 3229c68aedd..e2401ab0c46 100644
--- a/arch/x86/kernel/genx2apic_phys.c
+++ b/arch/x86/kernel/genx2apic_phys.c
@@ -118,14 +118,9 @@ static unsigned long set_apic_id(unsigned int id)
118 return x; 118 return x;
119} 119}
120 120
121static unsigned int x2apic_read_id(void)
122{
123 return apic_read(APIC_ID);
124}
125
126static unsigned int phys_pkg_id(int index_msb) 121static unsigned int phys_pkg_id(int index_msb)
127{ 122{
128 return x2apic_read_id() >> index_msb; 123 return current_cpu_data.initial_apicid >> index_msb;
129} 124}
130 125
131void x2apic_send_IPI_self(int vector) 126void x2apic_send_IPI_self(int vector)