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/cpuid: Rename have_cpuid_p() to cpuid_feature()

In order to let all the APIs under <cpuid/api.h> have a shared "cpuid_"
namespace, rename have_cpuid_p() to cpuid_feature().

Adjust all call-sites accordingly.

Suggested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Ahmed S. Darwish <darwi@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: John Ogness <john.ogness@linutronix.de>
Cc: x86-cpuid@lists.linux.dev
Link: https://lore.kernel.org/r/20250508150240.172915-4-darwi@linutronix.de

authored by

Ahmed S. Darwish and committed by
Ingo Molnar
2f924ca3 968e3000

+8 -8
+2 -2
arch/x86/include/asm/cpuid/api.h
··· 14 14 */ 15 15 16 16 #ifdef CONFIG_X86_32 17 - bool have_cpuid_p(void); 17 + bool cpuid_feature(void); 18 18 #else 19 - static inline bool have_cpuid_p(void) 19 + static inline bool cpuid_feature(void) 20 20 { 21 21 return true; 22 22 }
+5 -5
arch/x86/kernel/cpu/common.c
··· 322 322 __setup("cachesize=", cachesize_setup); 323 323 324 324 /* Probe for the CPUID instruction */ 325 - bool have_cpuid_p(void) 325 + bool cpuid_feature(void) 326 326 { 327 327 return flag_is_changeable_p(X86_EFLAGS_ID); 328 328 } ··· 1711 1711 memset(&c->x86_capability, 0, sizeof(c->x86_capability)); 1712 1712 c->extended_cpuid_level = 0; 1713 1713 1714 - if (!have_cpuid_p()) 1714 + if (!cpuid_feature()) 1715 1715 identify_cpu_without_cpuid(c); 1716 1716 1717 1717 /* cyrix could have cpuid enabled via c_identify()*/ 1718 - if (have_cpuid_p()) { 1718 + if (cpuid_feature()) { 1719 1719 cpu_detect(c); 1720 1720 get_cpu_vendor(c); 1721 1721 intel_unlock_cpuid_leafs(c); ··· 1875 1875 { 1876 1876 c->extended_cpuid_level = 0; 1877 1877 1878 - if (!have_cpuid_p()) 1878 + if (!cpuid_feature()) 1879 1879 identify_cpu_without_cpuid(c); 1880 1880 1881 1881 /* cyrix could have cpuid enabled via c_identify()*/ 1882 - if (!have_cpuid_p()) 1882 + if (!cpuid_feature()) 1883 1883 return; 1884 1884 1885 1885 cpu_detect(c);
+1 -1
arch/x86/kernel/cpu/microcode/core.c
··· 118 118 * 3) Certain AMD patch levels are not allowed to be 119 119 * overwritten. 120 120 */ 121 - if (!have_cpuid_p() || 121 + if (!cpuid_feature() || 122 122 native_cpuid_ecx(1) & BIT(31) || 123 123 amd_check_current_patch_level()) 124 124 dis_ucode_ldr = true;