Commit d25ae38b authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar

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: default avatarYinghai Lu <yhlu.kernel@gmail.com>
Cc: Jack Steiner <steiner@sgi.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent edb181ac
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/ctype.h> #include <linux/ctype.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/hardirq.h> #include <linux/hardirq.h>
#include <linux/dmar.h>
#include <asm/smp.h> #include <asm/smp.h>
#include <asm/ipi.h> #include <asm/ipi.h>
...@@ -42,6 +43,11 @@ static struct genapic *apic_probe[] __initdata = { ...@@ -42,6 +43,11 @@ static struct genapic *apic_probe[] __initdata = {
*/ */
void __init setup_apic_routing(void) void __init setup_apic_routing(void)
{ {
if (genapic == &apic_x2apic_phys || genapic == &apic_x2apic_cluster) {
if (!intr_remapping_enabled)
genapic = &apic_flat;
}
if (genapic == &apic_flat) { if (genapic == &apic_flat) {
if (max_physical_apicid >= 8) if (max_physical_apicid >= 8)
genapic = &apic_physflat; genapic = &apic_physflat;
......
...@@ -14,7 +14,7 @@ DEFINE_PER_CPU(u32, x86_cpu_to_logical_apicid); ...@@ -14,7 +14,7 @@ DEFINE_PER_CPU(u32, x86_cpu_to_logical_apicid);
static int __init x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id) static int __init x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
{ {
if (cpu_has_x2apic && intr_remapping_enabled) if (cpu_has_x2apic)
return 1; return 1;
return 0; return 0;
......
...@@ -21,7 +21,7 @@ early_param("x2apic_phys", set_x2apic_phys_mode); ...@@ -21,7 +21,7 @@ early_param("x2apic_phys", set_x2apic_phys_mode);
static int __init x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id) static int __init x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
{ {
if (cpu_has_x2apic && intr_remapping_enabled && x2apic_phys) if (cpu_has_x2apic && x2apic_phys)
return 1; return 1;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment