aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2015-01-15 16:22:14 -0500
committerThomas Gleixner <tglx@linutronix.de>2015-01-22 09:10:54 -0500
commit2ca5b40479246087695d9e6343075b47ee6887ea (patch)
tree1d6d6cc40b1828bc5d6b6bb48ed2753c289f6f42 /arch/x86/kernel/apic
parentbfb050702990d6a2033d072cb2af583aee5c6fc5 (diff)
x86/ioapic: Check x2apic really
The x2apic_preenabled flag is just a horrible hack and if X2APIC support is disabled it does not reflect the actual hardware state. Check the hardware instead. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Jiang Liu <jiang.liu@linux.intel.com> Cc: Joerg Roedel <joro@8bytes.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Borislav Petkov <bp@alien8.de> Link: http://lkml.kernel.org/r/20150115211702.541280622@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/apic')
-rw-r--r--arch/x86/kernel/apic/apic.c4
-rw-r--r--arch/x86/kernel/apic/io_apic.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index ff2a8b8ffa0a..08144f5c1236 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1480,7 +1480,7 @@ static bool nox2apic __initdata;
1480#ifdef CONFIG_X86_X2APIC 1480#ifdef CONFIG_X86_X2APIC
1481int x2apic_mode; 1481int x2apic_mode;
1482/* x2apic enabled before OS handover */ 1482/* x2apic enabled before OS handover */
1483int x2apic_preenabled; 1483static int x2apic_preenabled;
1484static int x2apic_disabled; 1484static int x2apic_disabled;
1485static int __init setup_nox2apic(char *str) 1485static int __init setup_nox2apic(char *str)
1486{ 1486{
@@ -1569,6 +1569,8 @@ void enable_x2apic(void)
1569 wrmsrl(MSR_IA32_APICBASE, msr | X2APIC_ENABLE); 1569 wrmsrl(MSR_IA32_APICBASE, msr | X2APIC_ENABLE);
1570 } 1570 }
1571} 1571}
1572#else
1573#define x2apic_preenabled (0)
1572#endif /* CONFIG_X86_X2APIC */ 1574#endif /* CONFIG_X86_X2APIC */
1573 1575
1574static int __init try_to_enable_IR(void) 1576static int __init try_to_enable_IR(void)
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 3f5f60406ab1..e5e00f509f03 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -2295,7 +2295,7 @@ static inline void __init check_timer(void)
2295 } 2295 }
2296 local_irq_disable(); 2296 local_irq_disable();
2297 apic_printk(APIC_QUIET, KERN_INFO "..... failed :(.\n"); 2297 apic_printk(APIC_QUIET, KERN_INFO "..... failed :(.\n");
2298 if (x2apic_preenabled) 2298 if (apic_is_x2apic_enabled())
2299 apic_printk(APIC_QUIET, KERN_INFO 2299 apic_printk(APIC_QUIET, KERN_INFO
2300 "Perhaps problem with the pre-enabled x2apic mode\n" 2300 "Perhaps problem with the pre-enabled x2apic mode\n"
2301 "Try booting with x2apic and interrupt-remapping disabled in the bios.\n"); 2301 "Try booting with x2apic and interrupt-remapping disabled in the bios.\n");