From: "David Wang" <00107082@163.com>
To: "Xiaojian Du" <xiaojidu@amd.com>
Cc: perry.yuan@amd.com, Alexander.Deucher@amd.com, Li.Meng@amd.com,
Mario.Limonciello@amd.com, Xiaojian.Du@amd.com,
Xinmei.Huang@amd.com, gautham.shenoy@amd.com,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
rafael.j.wysocki@intel.com, viresh.kumar@linaro.org
Subject: Re: [Regression] 6.11.0-rc1: AMD CPU boot with error when CPPC feature disabled by BIOS
Date: Wed, 31 Jul 2024 08:25:01 +0800 (CST) [thread overview]
Message-ID: <2c2569aa.47a.191062d0d40.Coremail.00107082@163.com> (raw)
In-Reply-To: <1d5f4859-6810-355f-3e0e-ed1c9e53c3f4@amd.com>
Hi Du,
Thanks for the quick response
At 2024-07-31 01:43:47, "Xiaojian Du" <xiaojidu@amd.com> wrote:
>Hi David,
>
>CPPC feature is enabled by default in BIOS for new ZENX arch CPU, and
>amd-pstate driver is enabled in new linux kernel.
>
>For your system ,why CPPC is disabled, is it for debug or some special case?
I do not have any special purpose, it is just the default BIOS setup for my old system.
>
>If you want to use legacy acpi cpu driver, you can disable amd-pstate
>driver module in your linux kernel config file and compile a new kernel.
>
>> Those warning message was introduced by commit:
>> bff7d13c190ad98cf4f877189b022c75df4cb383 ("cpufreq: amd-pstate: add debug message while CPPC is supported and disabled by SBIOS)
>> , which make sense.
>>
>> Those error message was introduced by commit:
>> 8f8b42c1fcc939a73b547b172a9ffcb65ef4bf47 ("cpufreq: amd-pstate: optimize the initial frequency values verification")
>> , when CPPC is disabled by BIOS, this error message does not make sense, and the error return-code would abort the driver registeration,
>> but this behavior could be handled earlier when detecting CPPC feature.
>>
>> I feel following changes would make a clean fix: do not register amd_pstate driver when CPPC disabled by BIOS.
>> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
>> index 68c616b572f2..b06faea58fd4 100644
>> --- a/drivers/cpufreq/amd-pstate.c
>> +++ b/drivers/cpufreq/amd-pstate.c
>> @@ -1837,8 +1837,6 @@ static bool amd_cppc_supported(void)
>> * If the CPPC feature is disabled in the BIOS for processors that support MSR-based CPPC,
>> * the AMD Pstate driver may not function correctly.
>> * Check the CPPC flag and display a warning message if the platform supports CPPC.
>> - * Note: below checking code will not abort the driver registeration process because of
>> - * the code is added for debugging purposes.
>
>As you see, it is for debug purpose, in some corner case, if CPPC
>feature is disabled, this debug info will help to guide user to
>*re-enable* it.
>
>Target system, including CPU+baseboard+BIOS, is supposed to enable and
>use CPPC feature for better Performance per Watt.
I agree that the warning guide makes total sense, but the *errors* does not, why bother trying and report error when the feature is disabled by BIOS.
>
>> */
>> if (!cpu_feature_enabled(X86_FEATURE_CPPC)) {
>> if (cpu_feature_enabled(X86_FEATURE_ZEN1) || cpu_feature_enabled(X86_FEATURE_ZEN2)) {
>> @@ -1856,6 +1854,7 @@ static bool amd_cppc_supported(void)
>> if (warn)
>> pr_warn_once("The CPPC feature is supported but currently disabled by the BIOS.\n"
>> "Please enable it if your BIOS has the CPPC option.\n");
>> + return false;
>Maybe need a pair of curly brace after this "if(warn)" for your change.
>> return true;
>> }
>>
>>
>>
>> Thanks
>> David
>>
next prev parent reply other threads:[~2024-07-31 0:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-30 14:01 [Regression] 6.11.0-rc1: AMD CPU boot with error when CPPC feature disabled by BIOS David Wang
2024-07-30 17:43 ` Xiaojian Du
2024-07-31 0:25 ` David Wang [this message]
2024-07-31 3:16 ` Xiaojian Du
2024-07-31 3:39 ` David Wang
2024-07-31 4:21 ` Xiaojian Du
2024-07-31 4:33 ` David Wang
2024-07-31 10:12 ` Gautham R.Shenoy
2024-07-31 12:58 ` David Wang
2024-08-02 5:02 ` Gautham R.Shenoy
2024-09-26 20:56 ` Luna Nova
2024-09-30 14:47 ` Gautham R. Shenoy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2c2569aa.47a.191062d0d40.Coremail.00107082@163.com \
--to=00107082@163.com \
--cc=Alexander.Deucher@amd.com \
--cc=Li.Meng@amd.com \
--cc=Mario.Limonciello@amd.com \
--cc=Xiaojian.Du@amd.com \
--cc=Xinmei.Huang@amd.com \
--cc=gautham.shenoy@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=perry.yuan@amd.com \
--cc=rafael.j.wysocki@intel.com \
--cc=viresh.kumar@linaro.org \
--cc=xiaojidu@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox