[PATCH 4/8] tools/power x86_energy_perf_policy: rename get_cpuid_or_exit() with intel prefix
From: Perry Yuan
Date: Mon Jan 29 2024 - 22:20:12 EST
From: Perry Yuan <Perry.Yuan@xxxxxxx>
Rename the get_cpuid_or_exit() function with intel string prefix, that
will help to know the function are used on Intel processors.
No functional impact.
Signed-off-by: Perry Yuan <Perry.Yuan@xxxxxxx>
Suggested-by: Fontenot Nathan <Nathan.Fontenot@xxxxxxx>
---
.../x86_energy_perf_policy/x86_energy_perf_policy.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c b/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
index 3f09c12f24fa..a08403ab219a 100644
--- a/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
+++ b/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
@@ -1515,7 +1515,7 @@ void probe_dev_msr(void)
err(-5, "no /dev/cpu/0/msr, Try \"# modprobe msr\" ");
}
-static void get_cpuid_or_exit(unsigned int leaf,
+static void intel_get_cpuid_or_exit(unsigned int leaf,
unsigned int *eax, unsigned int *ebx,
unsigned int *ecx, unsigned int *edx)
{
@@ -1552,7 +1552,7 @@ void early_cpuid(void)
authentic_amd = 1;
if (genuine_intel) {
- get_cpuid_or_exit(1, &fms, &ebx, &ecx, &edx);
+ intel_get_cpuid_or_exit(1, &fms, &ebx, &ecx, &edx);
family = (fms >> 8) & 0xf;
model = (fms >> 4) & 0xf;
if (family == 6 || family == 0xf)
@@ -1566,7 +1566,7 @@ void early_cpuid(void)
bdx_highest_ratio = msr & 0xFF;
}
- get_cpuid_or_exit(0x6, &eax, &ebx, &ecx, &edx);
+ intel_get_cpuid_or_exit(0x6, &eax, &ebx, &ecx, &edx);
turbo_is_enabled = (eax >> 1) & 1;
has_hwp = (eax >> 7) & 1;
has_epb = (ecx >> 3) & 1;
@@ -1591,7 +1591,7 @@ void parse_cpuid(void)
eax = ebx = ecx = edx = 0;
- get_cpuid_or_exit(0, &max_level, &ebx, &ecx, &edx);
+ intel_get_cpuid_or_exit(0, &max_level, &ebx, &ecx, &edx);
if (ebx == 0x756e6547 && edx == 0x49656e69 && ecx == 0x6c65746e)
genuine_intel = 1;
@@ -1602,7 +1602,7 @@ void parse_cpuid(void)
fprintf(stderr, "CPUID(0): %.4s%.4s%.4s ",
(char *)&ebx, (char *)&edx, (char *)&ecx);
- get_cpuid_or_exit(1, &fms, &ebx, &ecx, &edx);
+ intel_get_cpuid_or_exit(1, &fms, &ebx, &ecx, &edx);
family = (fms >> 8) & 0xf;
model = (fms >> 4) & 0xf;
stepping = fms & 0xf;
@@ -1632,7 +1632,7 @@ void parse_cpuid(void)
errx(1, "CPUID: no MSR");
if (genuine_intel) {
- get_cpuid_or_exit(0x6, &eax, &ebx, &ecx, &edx);
+ intel_get_cpuid_or_exit(0x6, &eax, &ebx, &ecx, &edx);
/* turbo_is_enabled already set */
/* has_hwp already set */
has_hwp_notify = eax & (1 << 8);
--
2.34.1