]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.arch/x2APIC_PATCH_36_of_41_276605dddb74cbf1b77696e32c4a947e42cec52d
Imported linux-2.6.27.39 suse/xen patches.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.arch / x2APIC_PATCH_36_of_41_276605dddb74cbf1b77696e32c4a947e42cec52d
CommitLineData
2cb7cef9
BS
1From: Suresh Siddha <suresh.b.siddha@intel.com>
2Subject: x2apic: use x2apic id reported by cpuid during topology discovery
3References: fate #303948 and fate #303984
4Patch-Mainline: queued for .28
5Commit-ID: 276605dddb74cbf1b77696e32c4a947e42cec52d
6
7Signed-off-by: Thomas Renninger <trenn@suse.de>
8
9use x2apic id reported by cpuid during topology discovery, instead of the
10apic id configured in the APIC. For most of the systems, x2apic id
11reported by cpuid leaf 0xb will be same as the physical apic id reported
12by the APIC_ID register of the APIC. We follow the suggested guidelines
13and use the apic id reported by the cpuid.
14
15No change to non-generic UV platforms, will use the apic id reported in the
16APIC_ID register as the cpuid reported apic id's may not be unique.
17
18Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
19Signed-off-by: Ingo Molnar <mingo@elte.hu>
20
21---
22 arch/x86/kernel/genx2apic_cluster.c | 7 +------
23 arch/x86/kernel/genx2apic_phys.c | 7 +------
24 2 files changed, 2 insertions(+), 12 deletions(-)
25
26Index: linux-2.6.26/arch/x86/kernel/genx2apic_cluster.c
27===================================================================
28--- linux-2.6.26.orig/arch/x86/kernel/genx2apic_cluster.c
29+++ linux-2.6.26/arch/x86/kernel/genx2apic_cluster.c
30@@ -120,14 +120,9 @@ static unsigned long set_apic_id(unsigne
31 return x;
32 }
33
34-static unsigned int x2apic_read_id(void)
35-{
36- return apic_read(APIC_ID);
37-}
38-
39 static unsigned int phys_pkg_id(int index_msb)
40 {
41- return x2apic_read_id() >> index_msb;
42+ return current_cpu_data.initial_apicid >> index_msb;
43 }
44
45 static void x2apic_send_IPI_self(int vector)
46Index: linux-2.6.26/arch/x86/kernel/genx2apic_phys.c
47===================================================================
48--- linux-2.6.26.orig/arch/x86/kernel/genx2apic_phys.c
49+++ linux-2.6.26/arch/x86/kernel/genx2apic_phys.c
50@@ -120,14 +120,9 @@ static unsigned long set_apic_id(unsigne
51 return x;
52 }
53
54-static unsigned int x2apic_read_id(void)
55-{
56- return apic_read(APIC_ID);
57-}
58-
59 static unsigned int phys_pkg_id(int index_msb)
60 {
61- return x2apic_read_id() >> index_msb;
62+ return current_cpu_data.initial_apicid >> index_msb;
63 }
64
65 void x2apic_send_IPI_self(int vector)