]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: Suresh Siddha <suresh.b.siddha@intel.com> |
2 | Subject: x2apic: use x2apic id reported by cpuid during topology discovery | |
3 | References: fate #303948 and fate #303984 | |
4 | Patch-Mainline: queued for .28 | |
5 | Commit-ID: 276605dddb74cbf1b77696e32c4a947e42cec52d | |
6 | ||
7 | Signed-off-by: Thomas Renninger <trenn@suse.de> | |
8 | ||
9 | use x2apic id reported by cpuid during topology discovery, instead of the | |
10 | apic id configured in the APIC. For most of the systems, x2apic id | |
11 | reported by cpuid leaf 0xb will be same as the physical apic id reported | |
12 | by the APIC_ID register of the APIC. We follow the suggested guidelines | |
13 | and use the apic id reported by the cpuid. | |
14 | ||
15 | No change to non-generic UV platforms, will use the apic id reported in the | |
16 | APIC_ID register as the cpuid reported apic id's may not be unique. | |
17 | ||
18 | Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> | |
19 | Signed-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 | ||
26 | Index: 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) | |
46 | Index: 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) |