x86/cpufeature: Remove cpu_has_x2apic
authorBorislav Petkov <bp@suse.de>
Tue, 29 Mar 2016 15:41:57 +0000 (17:41 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 31 Mar 2016 11:35:08 +0000 (13:35 +0200)
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Tony Luck <tony.luck@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1459266123-21878-5-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/ia64/include/asm/iommu.h
arch/x86/include/asm/apic.h
arch/x86/include/asm/cpufeature.h
arch/x86/kernel/apic/apic.c

index 105c93b00b1bc53ce22f04ffd249595b5001c4d2..1d1212901ae70138466b7b32a6e04538d8f73a9d 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef _ASM_IA64_IOMMU_H
 #define _ASM_IA64_IOMMU_H 1
 
-#define cpu_has_x2apic 0
 /* 10 seconds */
 #define DMAR_OPERATION_TIMEOUT (((cycles_t) local_cpu_data->itc_freq)*10)
 
index 98f25bbafac4c52c10e87dc8cd85e6e3914fa4d6..bc27611fa58f1b0b522beefb3117afb1f5c250e6 100644 (file)
@@ -239,10 +239,10 @@ extern void __init check_x2apic(void);
 extern void x2apic_setup(void);
 static inline int x2apic_enabled(void)
 {
-       return cpu_has_x2apic && apic_is_x2apic_enabled();
+       return boot_cpu_has(X86_FEATURE_X2APIC) && apic_is_x2apic_enabled();
 }
 
-#define x2apic_supported()     (cpu_has_x2apic)
+#define x2apic_supported()     (boot_cpu_has(X86_FEATURE_X2APIC))
 #else /* !CONFIG_X86_X2APIC */
 static inline void check_x2apic(void) { }
 static inline void x2apic_setup(void) { }
index 33c29aabc9aaf18791db472cc5f21e6a00d3b450..3da7aec9fca13b15709a186ee358a743b860985b 100644 (file)
@@ -132,7 +132,6 @@ extern const char * const x86_bug_flags[NBUGINTS*32];
 #define cpu_has_clflush                boot_cpu_has(X86_FEATURE_CLFLUSH)
 #define cpu_has_gbpages                boot_cpu_has(X86_FEATURE_GBPAGES)
 #define cpu_has_pat            boot_cpu_has(X86_FEATURE_PAT)
-#define cpu_has_x2apic         boot_cpu_has(X86_FEATURE_X2APIC)
 #define cpu_has_xsave          boot_cpu_has(X86_FEATURE_XSAVE)
 #define cpu_has_xsaves         boot_cpu_has(X86_FEATURE_XSAVES)
 /*
index d356987a04e97ba6537b2895d45114851e7b705b..d7867c885bf8a94bf15bf043f4ccf0aeafc597d7 100644 (file)
@@ -1561,7 +1561,7 @@ void __init check_x2apic(void)
                pr_info("x2apic: enabled by BIOS, switching to x2apic ops\n");
                x2apic_mode = 1;
                x2apic_state = X2APIC_ON;
-       } else if (!cpu_has_x2apic) {
+       } else if (!boot_cpu_has(X86_FEATURE_X2APIC)) {
                x2apic_state = X2APIC_DISABLED;
        }
 }