1 From: Yinghai Lu <yhlu.kernel@gmail.com>
2 Subject: x86: add apic probe for genapic 64bit - fix
3 References: fate #303948 and fate #303984
4 Patch-Mainline: queued for .28
5 Commit-ID: d25ae38b7e005af03843833bbd811ffe8c5f8cb4
7 Signed-off-by: Thomas Renninger <trenn@suse.de>
9 intr_remapping_enabled get assigned later, so need to check that
12 Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
13 Cc: Jack Steiner <steiner@sgi.com>
14 Cc: Suresh Siddha <suresh.b.siddha@intel.com>
15 Signed-off-by: Ingo Molnar <mingo@elte.hu>
18 arch/x86/kernel/genapic_64.c | 6 ++++++
19 arch/x86/kernel/genx2apic_cluster.c | 2 +-
20 arch/x86/kernel/genx2apic_phys.c | 2 +-
21 3 files changed, 8 insertions(+), 2 deletions(-)
23 Index: linux-2.6.26/arch/x86/kernel/genapic_64.c
24 ===================================================================
25 --- linux-2.6.26.orig/arch/x86/kernel/genapic_64.c
26 +++ linux-2.6.26/arch/x86/kernel/genapic_64.c
28 #include <linux/ctype.h>
29 #include <linux/init.h>
30 #include <linux/hardirq.h>
31 +#include <linux/dmar.h>
35 @@ -42,6 +43,11 @@ static struct genapic *apic_probe[] __in
37 void __init setup_apic_routing(void)
39 + if (genapic == &apic_x2apic_phys || genapic == &apic_x2apic_cluster) {
40 + if (!intr_remapping_enabled)
41 + genapic = &apic_flat;
44 if (genapic == &apic_flat) {
45 if (max_physical_apicid >= 8)
46 genapic = &apic_physflat;
47 Index: linux-2.6.26/arch/x86/kernel/genx2apic_cluster.c
48 ===================================================================
49 --- linux-2.6.26.orig/arch/x86/kernel/genx2apic_cluster.c
50 +++ linux-2.6.26/arch/x86/kernel/genx2apic_cluster.c
51 @@ -14,7 +14,7 @@ DEFINE_PER_CPU(u32, x86_cpu_to_logical_a
53 static int __init x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
55 - if (cpu_has_x2apic && intr_remapping_enabled)
60 Index: linux-2.6.26/arch/x86/kernel/genx2apic_phys.c
61 ===================================================================
62 --- linux-2.6.26.orig/arch/x86/kernel/genx2apic_phys.c
63 +++ linux-2.6.26/arch/x86/kernel/genx2apic_phys.c
64 @@ -23,7 +23,7 @@ early_param("x2apic_phys", set_x2apic_ph
66 static int __init x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
68 - if (cpu_has_x2apic && intr_remapping_enabled && x2apic_phys)
69 + if (cpu_has_x2apic && x2apic_phys)