public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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 12:33:36 +0800 (CST)	[thread overview]
Message-ID: <6cddbf5f.4164.1910710a3b2.Coremail.00107082@163.com> (raw)
In-Reply-To: <7e2275d5-19dc-555e-e8e1-ed79b408c0e3@amd.com>

At 2024-07-31 12:21:05, "Xiaojian Du" <xiaojidu@amd.com> wrote:
>
>On 2024/7/31 11:39, David Wang wrote:
>> At 2024-07-31 11:16:14, "Xiaojian Du" <xiaojidu@amd.com> wrote:
>>> On 2024/7/31 8:25, David Wang wrote:
>>>> Hi Du,
>>>>
>>>> Thanks for the quick response
>>>>
>>>> ...
>>>> I feel that you are arguing for the warning and the errors separately.
>>>> Separately,   I agree warning or error message make sense as you explained,  but together I feel confused:
>>>> Receiving a warning that CPPC feature is disable by BIOS already notify users that amd-pstate would not work, right?
>Warning is not enough, error will guide user to switch to acpi cpu 
>driver or seek more support from OEM.
>>>> Is it possible, that those two condition coexists: CPPC is disabled by BIOS, and  amd-pstate could function properly?
>>>>
>>>>   
>
>No possible, the current amd-pstate driver is based on CPPC feature.
>
>Thanks.
>Xiaojian
>

So, what about the patch I mentioned:  when CPPC is disabled by  BIOS, print warning message and abort amd-pstate driver registration?
(I made a code block mistake in the patch I posted before)

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.
         */
        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)
+        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;
+         }
        return true;
 } 



Thanks
David


  reply	other threads:[~2024-07-31  4:34 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
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 [this message]
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=6cddbf5f.4164.1910710a3b2.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