public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gautham R.Shenoy <gautham.shenoy@amd.com>
To: David Wang <00107082@163.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>,
	<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: Fri, 2 Aug 2024 10:32:48 +0530	[thread overview]
Message-ID: <87v80jbjpj.fsf@BLR-5CG11610CF.amd.com> (raw)
In-Reply-To: <2f793cc8.a13d.19108df0a58.Coremail.00107082@163.com>


Hello David,

"David Wang" <00107082@163.com> writes:

> Hi,
>
> At 2024-07-31 18:12:12, "Gautham R.Shenoy" <gautham.shenoy@amd.com> wrote:
>>Hello David,
>>
>>David Wang <00107082@163.com> writes:
>>
>>> Hi,
>>>
>>> I notice some kernel warning and errors when I update to 6.11.0-rc1:
>>>
>>>  kernel: [    1.022739] amd_pstate: The CPPC feature is supported but currently disabled by the BIOS.
>>>  kernel: [    1.022739] Please enable it if your BIOS has the CPPC option.
>>>  kernel: [    1.098054] amd_pstate: min_freq(0) or max_freq(0) or nominal_freq(0) value is incorrect
>>>  kernel: [    1.110058] amd_pstate: min_freq(0) or max_freq(0) or nominal_freq(0) value is incorrect
>>>  kernel: [    1.122057] amd_pstate: min_freq(0) or max_freq(0) or nominal_freq(0) value is incorrect
>>>  kernel: [    1.134062] amd_pstate: min_freq(0) or max_freq(0) or nominal_freq(0) value is incorrect
>>>  kernel: [    1.134641] amd_pstate: min_freq(0) or max_freq(0) or nominal_freq(0) value is incorrect
>>>  kernel: [    1.135128] amd_pstate: min_freq(0) or max_freq(0) or nominal_freq(0) value is incorrect
>>>  kernel: [    1.135693] amd_pstate: min_freq(0) or max_freq(0) or nominal_freq(0) value is incorrect
>>>  kernel: [    1.136371] amd_pstate: min_freq(0) or max_freq(0) or nominal_freq(0) value is incorrect
>>>  kernel: [    1.136390] amd_pstate: failed to register with return -19
>>>  kernel: [    1.138410] ledtrig-cpu: registered to indicate activity on CPUs
>>>
>>>
>>> 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.
>>
>>
>>If CPPC is disabed in the BIOS, then the _CPC objects shouldn't have
>>been created. And the error message that you should have seen is
>>"the _CPC object is not present in SBIOS or ACPI disabled".
>>
>>
>>Could you please share the family and model number of the platform where
>>you are observing this ?
>
> My `cat /proc/cpuinfo` shows something as following:
> processor	: 0
> vendor_id	: AuthenticAMD
> cpu family	: 23
> model		: 113


This is Family 0x17 (Zen2), Model 0x71. AFAIK, this processor supports
CPPC but does not have the support for the CPPC MSRs. Hence the CPPC
communication occurs via shared-memory.

Hence the warning introduced by the commit bff7d13c190a ("cpufreq:
amd-pstate: add debug message while CPPC is supported and disabled by
SBIOS") is not applicable on your platform. I will send a patch to
rectify this which avoids the warning for Zen2 Models 0x70-0x7F.

Regarding the following errors that you are observing 

>>>  kernel: [    1.098054] amd_pstate: min_freq(0) or max_freq(0) or nominal_freq(0) value is incorrect
>>>  kernel: [    1.110058] amd_pstate: min_freq(0) or max_freq(0) or nominal_freq(0) value is incorrect
>>>  kernel: [    1.122057] amd_pstate: min_freq(0) or max_freq(0) or nominal_freq(0) value is incorrect
>>>  kernel: [    1.134062] amd_pstate: min_freq(0) or max_freq(0) or nominal_freq(0) value is incorrect
>>>  kernel: [    1.134641] amd_pstate: min_freq(0) or max_freq(0) or nominal_freq(0) value is incorrect
>>>  kernel: [    1.135128] amd_pstate: min_freq(0) or max_freq(0) or nominal_freq(0) value is incorrect
>>>  kernel: [    1.135693] amd_pstate: min_freq(0) or max_freq(0) or nominal_freq(0) value is incorrect
>>>  kernel: [    1.136371] amd_pstate: min_freq(0) or max_freq(0) or nominal_freq(0) value is incorrect
>>>  kernel: [    1.136390] amd_pstate: failed to register with return -19


it appears that the CPPC version on your platform is v2 which does not
advertise the nominal_freq and the lowest_freq. In the absence of these,
it is not possible for the amd-pstate driver to infer the
min/max_freq. Which is why the driver bails at this later stage.

The way around it is to add a quirk for your BIOS as done in this commit
from Perry:
eb8b6c368202 ("cpufreq: amd-pstate: Add quirk for the pstate CPPC capabilities missing")


--
Thanks and Regards
gautham.

  reply	other threads:[~2024-08-02  5:04 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
2024-07-31 10:12 ` Gautham R.Shenoy
2024-07-31 12:58   ` David Wang
2024-08-02  5:02     ` Gautham R.Shenoy [this message]
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=87v80jbjpj.fsf@BLR-5CG11610CF.amd.com \
    --to=gautham.shenoy@amd.com \
    --cc=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=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 \
    /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