x86/apic: Correctly detect X2APIC status in function enable_IR()
authorJiang Liu <[email protected]>
Wed, 7 Jan 2015 07:31:33 +0000 (15:31 +0800)
committerThomas Gleixner <[email protected]>
Thu, 15 Jan 2015 10:24:23 +0000 (11:24 +0100)
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 <[email protected]>
Cc: Tony Luck <[email protected]>
Cc: [email protected]
Cc: H. Peter Anvin <[email protected]>
Cc: Joerg Roedel <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Yinghai Lu <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: HATAYAMA Daisuke <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Richard Weinberger <[email protected]>
Cc: Oren Twaig <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
arch/x86/kernel/apic/apic.c

index 2dbd3a0ae9f13fbf3f378aeb96155fbb8b296c41..11358df3bd081c8ca206e6e6d72cfb169d31457d 100644 (file)
@@ -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;