]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.39/patches.arch/x2APIC_PATCH_15_of_41_2d7a66d02e11af9ab8e16c76d22767e622b4e3d7
Imported linux-2.6.27.39 suse/xen patches.
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.arch / x2APIC_PATCH_15_of_41_2d7a66d02e11af9ab8e16c76d22767e622b4e3d7
1 From: Suresh Siddha <suresh.b.siddha@intel.com>
2 Subject: x64, x2apic/intr-remap: Interrupt-remapping and x2apic support, fix
3 References: fate #303948 and fate #303984
4 Patch-Mainline: queued for .28
5 Commit-ID: 2d7a66d02e11af9ab8e16c76d22767e622b4e3d7
6
7 Signed-off-by: Thomas Renninger <trenn@suse.de>
8
9 Yinghai Lu wrote:
10
11 > Setting APIC routing to physical flat
12 > Kernel panic - not syncing: Boot APIC ID in local APIC unexpected (0 vs 4)
13 > Pid: 1, comm: swapper Not tainted 2.6.26-rc9-tip-01763-g74f94b1-dirty #320
14 >
15 > Call Trace:
16 > [<ffffffff80a21505>] ? set_cpu_sibling_map+0x38c/0x3bd
17 > [<ffffffff80245215>] ? read_xapic_id+0x25/0x3e
18 > [<ffffffff80e5a2c3>] ? verify_local_APIC+0x139/0x1b9
19 > [<ffffffff80245215>] ? read_xapic_id+0x25/0x3e
20 > [<ffffffff80e589af>] ? native_smp_prepare_cpus+0x224/0x2e9
21 > [<ffffffff80e4881a>] ? kernel_init+0x64/0x341
22 > [<ffffffff8022a439>] ? child_rip+0xa/0x11
23 > [<ffffffff80e487b6>] ? kernel_init+0x0/0x341
24 > [<ffffffff8022a42f>] ? child_rip+0x0/0x11
25 >
26 >
27 > guess read_apic_id changing cuase some problem...
28
29 genapic's read_apic_id() returns the actual apic id extracted from
30 the APIC_ID register. And in some cases like UV, read_apic_id()
31 returns completely different values from APIC ID register.
32
33 Use the native apic register read, rather than genapic read_apic_id()
34 in verify_local_APIC()
35
36 And also, lapic_suspend() should also use native apic register read.
37
38 Reported-by: Yinghai Lu <yhlu.kernel@gmail.com>
39 Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
40 Cc: "akpm@linux-foundation.org" <akpm@linux-foundation.org>
41 Cc: "arjan@linux.intel.com" <arjan@linux.intel.com>
42 Cc: "andi@firstfloor.org" <andi@firstfloor.org>
43 Cc: "ebiederm@xmission.com" <ebiederm@xmission.com>
44 Cc: "jbarnes@virtuousgeek.org" <jbarnes@virtuousgeek.org>
45 Cc: "steiner@sgi.com" <steiner@sgi.com>
46 Cc: "jeremy@goop.org" <jeremy@goop.org>
47 Signed-off-by: Ingo Molnar <mingo@elte.hu>
48
49 ---
50 arch/x86/kernel/apic_64.c | 6 +++---
51 1 file changed, 3 insertions(+), 3 deletions(-)
52
53 --- a/arch/x86/kernel/apic_64.c
54 +++ b/arch/x86/kernel/apic_64.c
55 @@ -656,10 +656,10 @@ int __init verify_local_APIC(void)
56 /*
57 * The ID register is read/write in a real APIC.
58 */
59 - reg0 = read_apic_id();
60 + reg0 = apic_read(APIC_ID);
61 apic_printk(APIC_DEBUG, "Getting ID: %x\n", reg0);
62 apic_write(APIC_ID, reg0 ^ APIC_ID_MASK);
63 - reg1 = read_apic_id();
64 + reg1 = apic_read(APIC_ID);
65 apic_printk(APIC_DEBUG, "Getting ID: %x\n", reg1);
66 apic_write(APIC_ID, reg0);
67 if (reg1 != (reg0 ^ APIC_ID_MASK))
68 @@ -1163,7 +1163,7 @@ static int lapic_suspend(struct sys_devi
69
70 maxlvt = lapic_get_maxlvt();
71
72 - apic_pm_state.apic_id = read_apic_id();
73 + apic_pm_state.apic_id = apic_read(APIC_ID);
74 apic_pm_state.apic_taskpri = apic_read(APIC_TASKPRI);
75 apic_pm_state.apic_ldr = apic_read(APIC_LDR);
76 apic_pm_state.apic_dfr = apic_read(APIC_DFR);