Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/cpufeature: Remove cpu_has_x2apic

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>

authored by

Borislav Petkov and committed by
Ingo Molnar
62436a4d ab4a56fa

+3 -5
-1
arch/ia64/include/asm/iommu.h
··· 1 1 #ifndef _ASM_IA64_IOMMU_H 2 2 #define _ASM_IA64_IOMMU_H 1 3 3 4 - #define cpu_has_x2apic 0 5 4 /* 10 seconds */ 6 5 #define DMAR_OPERATION_TIMEOUT (((cycles_t) local_cpu_data->itc_freq)*10) 7 6
+2 -2
arch/x86/include/asm/apic.h
··· 239 239 extern void x2apic_setup(void); 240 240 static inline int x2apic_enabled(void) 241 241 { 242 - return cpu_has_x2apic && apic_is_x2apic_enabled(); 242 + return boot_cpu_has(X86_FEATURE_X2APIC) && apic_is_x2apic_enabled(); 243 243 } 244 244 245 - #define x2apic_supported() (cpu_has_x2apic) 245 + #define x2apic_supported() (boot_cpu_has(X86_FEATURE_X2APIC)) 246 246 #else /* !CONFIG_X86_X2APIC */ 247 247 static inline void check_x2apic(void) { } 248 248 static inline void x2apic_setup(void) { }
-1
arch/x86/include/asm/cpufeature.h
··· 132 132 #define cpu_has_clflush boot_cpu_has(X86_FEATURE_CLFLUSH) 133 133 #define cpu_has_gbpages boot_cpu_has(X86_FEATURE_GBPAGES) 134 134 #define cpu_has_pat boot_cpu_has(X86_FEATURE_PAT) 135 - #define cpu_has_x2apic boot_cpu_has(X86_FEATURE_X2APIC) 136 135 #define cpu_has_xsave boot_cpu_has(X86_FEATURE_XSAVE) 137 136 #define cpu_has_xsaves boot_cpu_has(X86_FEATURE_XSAVES) 138 137 /*
+1 -1
arch/x86/kernel/apic/apic.c
··· 1561 1561 pr_info("x2apic: enabled by BIOS, switching to x2apic ops\n"); 1562 1562 x2apic_mode = 1; 1563 1563 x2apic_state = X2APIC_ON; 1564 - } else if (!cpu_has_x2apic) { 1564 + } else if (!boot_cpu_has(X86_FEATURE_X2APIC)) { 1565 1565 x2apic_state = X2APIC_DISABLED; 1566 1566 } 1567 1567 }