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

Configure Feed

Select the types of activity you want to include in your feed.

x86/cpu: Remove get_this_hybrid_cpu_*()

Because calls to get_this_hybrid_cpu_type() and
get_this_hybrid_cpu_native_id() are not required now. cpu-type and
native-model-id are cached at boot in per-cpu struct cpuinfo_topology.

Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/r/20241211-add-cpu-type-v5-4-2ae010f50370@linux.intel.com

authored by

Pawan Gupta and committed by
Ingo Molnar
db5157df c4a8b711

-45
-14
arch/x86/include/asm/cpu.h
··· 50 50 static inline void bus_lock_init(void) {} 51 51 #endif 52 52 53 - #ifdef CONFIG_CPU_SUP_INTEL 54 - u8 get_this_hybrid_cpu_type(void); 55 - u32 get_this_hybrid_cpu_native_id(void); 56 - #else 57 - static inline u8 get_this_hybrid_cpu_type(void) 58 - { 59 - return 0; 60 - } 61 - 62 - static inline u32 get_this_hybrid_cpu_native_id(void) 63 - { 64 - return 0; 65 - } 66 - #endif 67 53 #ifdef CONFIG_IA32_FEAT_CTL 68 54 void init_ia32_feat_ctl(struct cpuinfo_x86 *c); 69 55 #else
-31
arch/x86/kernel/cpu/intel.c
··· 873 873 }; 874 874 875 875 cpu_dev_register(intel_cpu_dev); 876 - 877 - #define X86_HYBRID_CPU_TYPE_ID_SHIFT 24 878 - 879 - /** 880 - * get_this_hybrid_cpu_type() - Get the type of this hybrid CPU 881 - * 882 - * Returns the CPU type [31:24] (i.e., Atom or Core) of a CPU in 883 - * a hybrid processor. If the processor is not hybrid, returns 0. 884 - */ 885 - u8 get_this_hybrid_cpu_type(void) 886 - { 887 - if (!cpu_feature_enabled(X86_FEATURE_HYBRID_CPU)) 888 - return 0; 889 - 890 - return cpuid_eax(0x0000001a) >> X86_HYBRID_CPU_TYPE_ID_SHIFT; 891 - } 892 - 893 - /** 894 - * get_this_hybrid_cpu_native_id() - Get the native id of this hybrid CPU 895 - * 896 - * Returns the uarch native ID [23:0] of a CPU in a hybrid processor. 897 - * If the processor is not hybrid, returns 0. 898 - */ 899 - u32 get_this_hybrid_cpu_native_id(void) 900 - { 901 - if (!cpu_feature_enabled(X86_FEATURE_HYBRID_CPU)) 902 - return 0; 903 - 904 - return cpuid_eax(0x0000001a) & 905 - (BIT_ULL(X86_HYBRID_CPU_TYPE_ID_SHIFT) - 1); 906 - }