Skip to content

Commit 2f924ca

Browse files
Ahmed S. DarwishIngo Molnar
authored andcommitted
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 <[email protected]> Signed-off-by: Ahmed S. Darwish <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Andrew Cooper <[email protected]> Cc: John Ogness <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected]
1 parent 968e300 commit 2f924ca

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

arch/x86/include/asm/cpuid/api.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
*/
1515

1616
#ifdef CONFIG_X86_32
17-
bool have_cpuid_p(void);
17+
bool cpuid_feature(void);
1818
#else
19-
static inline bool have_cpuid_p(void)
19+
static inline bool cpuid_feature(void)
2020
{
2121
return true;
2222
}

arch/x86/kernel/cpu/common.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ static int __init cachesize_setup(char *str)
322322
__setup("cachesize=", cachesize_setup);
323323

324324
/* Probe for the CPUID instruction */
325-
bool have_cpuid_p(void)
325+
bool cpuid_feature(void)
326326
{
327327
return flag_is_changeable_p(X86_EFLAGS_ID);
328328
}
@@ -1711,11 +1711,11 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
17111711
memset(&c->x86_capability, 0, sizeof(c->x86_capability));
17121712
c->extended_cpuid_level = 0;
17131713

1714-
if (!have_cpuid_p())
1714+
if (!cpuid_feature())
17151715
identify_cpu_without_cpuid(c);
17161716

17171717
/* cyrix could have cpuid enabled via c_identify()*/
1718-
if (have_cpuid_p()) {
1718+
if (cpuid_feature()) {
17191719
cpu_detect(c);
17201720
get_cpu_vendor(c);
17211721
intel_unlock_cpuid_leafs(c);
@@ -1875,11 +1875,11 @@ static void generic_identify(struct cpuinfo_x86 *c)
18751875
{
18761876
c->extended_cpuid_level = 0;
18771877

1878-
if (!have_cpuid_p())
1878+
if (!cpuid_feature())
18791879
identify_cpu_without_cpuid(c);
18801880

18811881
/* cyrix could have cpuid enabled via c_identify()*/
1882-
if (!have_cpuid_p())
1882+
if (!cpuid_feature())
18831883
return;
18841884

18851885
cpu_detect(c);

arch/x86/kernel/cpu/microcode/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ bool __init microcode_loader_disabled(void)
118118
* 3) Certain AMD patch levels are not allowed to be
119119
* overwritten.
120120
*/
121-
if (!have_cpuid_p() ||
121+
if (!cpuid_feature() ||
122122
native_cpuid_ecx(1) & BIT(31) ||
123123
amd_check_current_patch_level())
124124
dis_ucode_ldr = true;

0 commit comments

Comments
 (0)