From: Jiang Liu Date: Wed, 7 Jan 2015 07:31:33 +0000 (+0800) Subject: x86/apic: Correctly detect X2APIC status in function enable_IR() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=89356cf20ecb0b9975b1dad9ed605dd4c6e68bcd;p=linux-beck.git x86/apic: Correctly detect X2APIC status in function enable_IR() X2APIC will be disabled if user specifies "nox2apic" on kernel command line, even when x2apic_preenabled is true. So correctly detect X2APIC status by using x2apic_enabled() instead of x2apic_preenabled. Signed-off-by: Jiang Liu Cc: Tony Luck Cc: iommu@lists.linux-foundation.org Cc: H. Peter Anvin Cc: Joerg Roedel Cc: Benjamin Herrenschmidt Cc: Yinghai Lu Cc: Borislav Petkov Cc: David Rientjes Cc: HATAYAMA Daisuke Cc: Jan Beulich Cc: Richard Weinberger Cc: Oren Twaig Link: http://lkml.kernel.org/r/1420615903-28253-7-git-send-email-jiang.liu@linux.intel.com Signed-off-by: Thomas Gleixner --- diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index 2dbd3a0ae9f1..11358df3bd08 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c @@ -1581,7 +1581,7 @@ int __init enable_IR(void) return -1; } - if (!x2apic_preenabled && skip_ioapic_setup) { + if (!x2apic_enabled() && skip_ioapic_setup) { pr_info("Skipped enabling intr-remap because of skipping " "io-apic setup\n"); return -1;