mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
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
This commit is contained in:
parent
968e300068
commit
2f924ca36d
3 changed files with 8 additions and 8 deletions
|
@ -14,9 +14,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_X86_32
|
#ifdef CONFIG_X86_32
|
||||||
bool have_cpuid_p(void);
|
bool cpuid_feature(void);
|
||||||
#else
|
#else
|
||||||
static inline bool have_cpuid_p(void)
|
static inline bool cpuid_feature(void)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -322,7 +322,7 @@ static int __init cachesize_setup(char *str)
|
||||||
__setup("cachesize=", cachesize_setup);
|
__setup("cachesize=", cachesize_setup);
|
||||||
|
|
||||||
/* Probe for the CPUID instruction */
|
/* Probe for the CPUID instruction */
|
||||||
bool have_cpuid_p(void)
|
bool cpuid_feature(void)
|
||||||
{
|
{
|
||||||
return flag_is_changeable_p(X86_EFLAGS_ID);
|
return flag_is_changeable_p(X86_EFLAGS_ID);
|
||||||
}
|
}
|
||||||
|
@ -1711,11 +1711,11 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
|
||||||
memset(&c->x86_capability, 0, sizeof(c->x86_capability));
|
memset(&c->x86_capability, 0, sizeof(c->x86_capability));
|
||||||
c->extended_cpuid_level = 0;
|
c->extended_cpuid_level = 0;
|
||||||
|
|
||||||
if (!have_cpuid_p())
|
if (!cpuid_feature())
|
||||||
identify_cpu_without_cpuid(c);
|
identify_cpu_without_cpuid(c);
|
||||||
|
|
||||||
/* cyrix could have cpuid enabled via c_identify()*/
|
/* cyrix could have cpuid enabled via c_identify()*/
|
||||||
if (have_cpuid_p()) {
|
if (cpuid_feature()) {
|
||||||
cpu_detect(c);
|
cpu_detect(c);
|
||||||
get_cpu_vendor(c);
|
get_cpu_vendor(c);
|
||||||
intel_unlock_cpuid_leafs(c);
|
intel_unlock_cpuid_leafs(c);
|
||||||
|
@ -1875,11 +1875,11 @@ static void generic_identify(struct cpuinfo_x86 *c)
|
||||||
{
|
{
|
||||||
c->extended_cpuid_level = 0;
|
c->extended_cpuid_level = 0;
|
||||||
|
|
||||||
if (!have_cpuid_p())
|
if (!cpuid_feature())
|
||||||
identify_cpu_without_cpuid(c);
|
identify_cpu_without_cpuid(c);
|
||||||
|
|
||||||
/* cyrix could have cpuid enabled via c_identify()*/
|
/* cyrix could have cpuid enabled via c_identify()*/
|
||||||
if (!have_cpuid_p())
|
if (!cpuid_feature())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
cpu_detect(c);
|
cpu_detect(c);
|
||||||
|
|
|
@ -118,7 +118,7 @@ bool __init microcode_loader_disabled(void)
|
||||||
* 3) Certain AMD patch levels are not allowed to be
|
* 3) Certain AMD patch levels are not allowed to be
|
||||||
* overwritten.
|
* overwritten.
|
||||||
*/
|
*/
|
||||||
if (!have_cpuid_p() ||
|
if (!cpuid_feature() ||
|
||||||
native_cpuid_ecx(1) & BIT(31) ||
|
native_cpuid_ecx(1) & BIT(31) ||
|
||||||
amd_check_current_patch_level())
|
amd_check_current_patch_level())
|
||||||
dis_ucode_ldr = true;
|
dis_ucode_ldr = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue