diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-07-25 22:39:03 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-27 00:28:16 -0400 |
commit | d25ae38b7e005af03843833bbd811ffe8c5f8cb4 (patch) | |
tree | bc4016cd14572affa04e3fed6f0dd095ce134fc3 | |
parent | edb181ac4b0c7c1240503da46349a3fb69af9ef6 (diff) |
x86: add apic probe for genapic 64bit - fix
intr_remapping_enabled get assigned later, so need to check that
in setup_apic_routing
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Jack Steiner <steiner@sgi.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/kernel/genapic_64.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/genx2apic_cluster.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/genx2apic_phys.c | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/arch/x86/kernel/genapic_64.c b/arch/x86/kernel/genapic_64.c index b3ba969c50d2..6c9bfc9e1e95 100644 --- a/arch/x86/kernel/genapic_64.c +++ b/arch/x86/kernel/genapic_64.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/ctype.h> | 16 | #include <linux/ctype.h> |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/hardirq.h> | 18 | #include <linux/hardirq.h> |
19 | #include <linux/dmar.h> | ||
19 | 20 | ||
20 | #include <asm/smp.h> | 21 | #include <asm/smp.h> |
21 | #include <asm/ipi.h> | 22 | #include <asm/ipi.h> |
@@ -42,6 +43,11 @@ static struct genapic *apic_probe[] __initdata = { | |||
42 | */ | 43 | */ |
43 | void __init setup_apic_routing(void) | 44 | void __init setup_apic_routing(void) |
44 | { | 45 | { |
46 | if (genapic == &apic_x2apic_phys || genapic == &apic_x2apic_cluster) { | ||
47 | if (!intr_remapping_enabled) | ||
48 | genapic = &apic_flat; | ||
49 | } | ||
50 | |||
45 | if (genapic == &apic_flat) { | 51 | if (genapic == &apic_flat) { |
46 | if (max_physical_apicid >= 8) | 52 | if (max_physical_apicid >= 8) |
47 | genapic = &apic_physflat; | 53 | genapic = &apic_physflat; |
diff --git a/arch/x86/kernel/genx2apic_cluster.c b/arch/x86/kernel/genx2apic_cluster.c index ef3f3182d50a..fed9f68efd66 100644 --- a/arch/x86/kernel/genx2apic_cluster.c +++ b/arch/x86/kernel/genx2apic_cluster.c | |||
@@ -14,7 +14,7 @@ DEFINE_PER_CPU(u32, x86_cpu_to_logical_apicid); | |||
14 | 14 | ||
15 | static int __init x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id) | 15 | static int __init x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id) |
16 | { | 16 | { |
17 | if (cpu_has_x2apic && intr_remapping_enabled) | 17 | if (cpu_has_x2apic) |
18 | return 1; | 18 | return 1; |
19 | 19 | ||
20 | return 0; | 20 | return 0; |
diff --git a/arch/x86/kernel/genx2apic_phys.c b/arch/x86/kernel/genx2apic_phys.c index 3229c68aedd4..958d537b4cc9 100644 --- a/arch/x86/kernel/genx2apic_phys.c +++ b/arch/x86/kernel/genx2apic_phys.c | |||
@@ -21,7 +21,7 @@ early_param("x2apic_phys", set_x2apic_phys_mode); | |||
21 | 21 | ||
22 | static int __init x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id) | 22 | static int __init x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id) |
23 | { | 23 | { |
24 | if (cpu_has_x2apic && intr_remapping_enabled && x2apic_phys) | 24 | if (cpu_has_x2apic && x2apic_phys) |
25 | return 1; | 25 | return 1; |
26 | 26 | ||
27 | return 0; | 27 | return 0; |