[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f5251cea-32f2-426d-b3c8-73ce4c562fac@amd.com>
Date: Wed, 26 Jun 2024 13:19:56 -0500
From: Mario Limonciello <mario.limonciello@....com>
To: Borislav Petkov <bp@...en8.de>
Cc: "Gautham R . Shenoy" <gautham.shenoy@....com>,
Perry Yuan <perry.yuan@....com>, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Dave Hansen <dave.hansen@...ux.intel.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
"H . Peter Anvin" <hpa@...or.com>, Huang Rui <ray.huang@....com>,
"Rafael J . Wysocki" <rafael@...nel.org>,
Viresh Kumar <viresh.kumar@...aro.org>,
Nikolay Borisov <nik.borisov@...e.com>, Peter Zijlstra
<peterz@...radead.org>,
"open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<linux-kernel@...r.kernel.org>,
"open list:AMD PSTATE DRIVER" <linux-pm@...r.kernel.org>
Subject: Re: [PATCH 2/2] cpufreq: amd-pstate: Use amd_get_highest_perf() to
lookup perf values
On 6/26/2024 12:18, Borislav Petkov wrote:
> On Tue, Jun 25, 2024 at 11:20:43PM -0500, Mario Limonciello wrote:
>> + /*
>> + * For AMD CPUs with Family ID 19H and Model ID range 0x70 to 0x7f,
>> + * the highest performance level is set to 196.
>> + * https://bugzilla.kernel.org/show_bug.cgi?id=218759
>> + */
>> + if (cpu_feature_enabled(X86_FEATURE_ZEN4)) {
>> + switch (c->x86_model) {
>> + case 0x70 ... 0x7f:
>
> Aha, so here it is non-inclusive - "<" and not "<=".
>
> So you need to check the model ranges first.
>
>> + return CPPC_HIGHEST_PERF_PERFORMANCE;
>> + default:
>> + return CPPC_HIGHEST_PERF_DEFAULT;
>
> As for patch 1.
>
>> + }
>> + }
>> +
>> + return CPPC_HIGHEST_PERF_DEFAULT;
>> }
>> EXPORT_SYMBOL_GPL(amd_get_highest_perf);
>>
>> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
>> index 80eaa58f1405..f468d8562e17 100644
>> --- a/drivers/cpufreq/amd-pstate.c
>> +++ b/drivers/cpufreq/amd-pstate.c
>> @@ -52,8 +52,6 @@
>> #define AMD_PSTATE_TRANSITION_LATENCY 20000
>> #define AMD_PSTATE_TRANSITION_DELAY 1000
>> #define AMD_PSTATE_FAST_CPPC_TRANSITION_DELAY 600
>> -#define CPPC_HIGHEST_PERF_PERFORMANCE 196
>> -#define CPPC_HIGHEST_PERF_DEFAULT 166
>>
>> #define AMD_CPPC_EPP_PERFORMANCE 0x00
>> #define AMD_CPPC_EPP_BALANCE_PERFORMANCE 0x80
>
> This already doesn't apply:
>
> checking file arch/x86/kernel/cpu/amd.c
> checking file drivers/cpufreq/amd-pstate.c
> Hunk #1 FAILED at 52.
>
I was thinking we would take this patch through superm1/linux-next or
linux-pm/linux-next as there is other amd-pstate stuff for the next
merge window, but if you'd rather go through x86 then we can wait until
after the merge window on this series.
Powered by blists - more mailing lists