[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d57d54d4-bbf6-4b54-ace9-61ecc8ce7c06@amd.com>
Date: Tue, 30 Jan 2024 13:56:37 -0600
From: Mario Limonciello <mario.limonciello@....com>
To: Perry Yuan <perry.yuan@....com>, rafael.j.wysocki@...el.com,
Borislav.Petkov@....com, viresh.kumar@...aro.org, Ray.Huang@....com,
gautham.shenoy@....com
Cc: Alexander.Deucher@....com, Xinmei.Huang@....com, Xiaojian.Du@....com,
Li.Meng@....com, linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH Resend 4/8] tools/power x86_energy_perf_policy: rename
get_cpuid_or_exit() with intel prefix
On 1/29/2024 23:56, Perry Yuan wrote:
> From: Perry Yuan <Perry.Yuan@....com>
>
> 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@....com>
> Suggested-by: Fontenot Nathan <Nathan.Fontenot@....com>
Reviewed-by: Mario Limonciello <mario.limonciello@....com>
> ---
> .../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);
Powered by blists - more mailing lists