mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David Wang" <00107082@163.com>
To: "Gautham R. Shenoy" <gautham.shenoy@amd.com>,
	 "Du, Xiaojian" <Xiaojian.Du@amd.com>
Cc: "rafael.j.wysocki@intel.com" <rafael.j.wysocki@intel.com>,
	 "Limonciello, Mario" <Mario.Limonciello@amd.com>,
	 "viresh.kumar@linaro.org" <viresh.kumar@linaro.org>,
	 "Huang, Ray" <Ray.Huang@amd.com>,
	 "Petkov, Borislav" <Borislav.Petkov@amd.com>,
	 "Huang, Shimmer" <Shimmer.Huang@amd.com>,
	 "Meng, Li (Jassmine)" <Li.Meng@amd.com>,
	 "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	 "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	 "Yuan, Perry" <Perry.Yuan@amd.com>
Subject: Re: [PATCH RESENT] cpufreq: amd-pstate: add quirk for Ryzen 3000 series processor
Date: Thu, 22 Aug 2024 16:03:45 +0800 (CST)	[thread overview]
Message-ID: <700df4cb.6db3.191791cef04.Coremail.00107082@163.com> (raw)
In-Reply-To: <ZsbT3WIkz5kTpfXx@BLRRASHENOY1.amd.com>


Hi, 

I just upgrade my BIOS, now the error message is gone(without quirk), I only have following warning:

[Thu Aug 22 15:12:02 2024] amd_pstate: The CPPC feature is supported but currently disabled by the BIOS.
                           Please enable it if your BIOS has the CPPC option.


No significant performance changes noticed yet:

Clean kernel deb package build time is about the same as before:
$ time make deb-pkg  -j6

real	38m50.977s
user	217m5.970s
sys	19m55.164s


And amd-pstate seems working (more accurate than quirks?):

$ cat  /sys/devices/system/cpu/cpufreq/policy0/*amd*
166
enabled
1740000
3905000
176

$ cpupower frequency-info
analyzing CPU 0:
  driver: amd-pstate-epp
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 550 MHz - 3.91 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 550 MHz and 3.91 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 3.90 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: no


And thanks for all your support!!!

BTW, about the quirks, I still think the dmi-match is not enough, 
CPU family model should also be checked to determine a accurate static quirk_entry.
 
David



At 2024-08-22 13:59:57, "Gautham R. Shenoy" <gautham.shenoy@amd.com> wrote:
>Hello David,
>
>On Thu, Aug 22, 2024 at 01:43:12PM +0800, David Wang wrote:
>> Hi, 
>> >
>> Thanks for the information.   (I did change my BIOS's CPPC config from "auto" to "enable", but error message still.)
>> But according to   another mail from gautham.shenoy@amd.com,  my understanding is that my CPU(AMD Ryzen 3 3100 4-Core Processor) does not have this CPPC feature,  would upgrade my BIOS really help?
>> ```
>
>To clarify,
>
>There are two ways in which the OS can communicate its CPPC
>requirements with the platform firmware.
>
>1. Via the following CPPC MSRs
>
>#define MSR_AMD_CPPC_CAP1		0xc00102b0
>#define MSR_AMD_CPPC_ENABLE		0xc00102b1
>#define MSR_AMD_CPPC_CAP2		0xc00102b2
>#define MSR_AMD_CPPC_REQ		0xc00102b3
>#define MSR_AMD_CPPC_STATUS		0xc00102b4
>
>2. Via the shared memory mechanism.
>
>
>The presence of the CPPC MSRs is indicated via X86_FEATURE_CPPC (CPUID
>0x80000008.EBX[27]). If available, the amd-pstate driver prefers that
>over the shared-memory mechanism.
>
>So the the following warning are intended only for platforms that are
>known to have the MSR support, not for the platforms which don't have
>the MSR support.
>
>"The CPPC feature is supported but currently disabled by the BIOS.
>Please enable it if your BIOS has the CPPC option"
>
>Your platform has CPPC feature (evident from the fact that amd-pstate
>worked for you with the BIOS quirk patch), and the amd-pstate driver can
>work just as well using the shared-memory mechanism (2 above) as long
>as your BIOS supports CPPC v3 (which advertises the nominal frequency
>in addition to the nominal perf).
>
>The current version of the BIOS that you are running doesn't seem to
>support CPPC v3, which is why the amd-pstate driver won't work
>out-of-box. This is why Xiaojian recommended upgrading the BIOS to the
>latest version.
>
>
>> 
>> Anyway, I will give BIOS upgrading  a try.
>
>Please do!
>
>> 
>> >If this issue is fixed in BIOS, no need to modify the upstream kernel code, right?
>> 
>> I think , even when upgrading BIOS would not help, the quirk just for my system is not worth be in kernel :)......
>>
>
>Fair point. However, in case you prefer to use amd-pstate, know that
>this is one way of enabling it, if the BIOS upgrade doesn't help.
>
>> 
>> Thanks
>> David
>
>--
>Thanks and Regards
>gautham.

      reply	other threads:[~2024-08-22  8:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-09  6:09 Perry Yuan
2024-08-09 13:06 ` David Wang
     [not found]   ` <b9899fcf-2774-b270-900a-72c7e1f10dfa@amd.com>
2024-08-22  4:25     ` 回复: [PATCH " Du, Xiaojian
2024-08-22  5:43       ` David Wang
2024-08-22  5:59         ` 回复: " Gautham R. Shenoy
2024-08-22  8:03           ` David Wang [this message]

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=700df4cb.6db3.191791cef04.Coremail.00107082@163.com \
    --to=00107082@163.com \
    --cc=Borislav.Petkov@amd.com \
    --cc=Li.Meng@amd.com \
    --cc=Mario.Limonciello@amd.com \
    --cc=Perry.Yuan@amd.com \
    --cc=Ray.Huang@amd.com \
    --cc=Shimmer.Huang@amd.com \
    --cc=Xiaojian.Du@amd.com \
    --cc=gautham.shenoy@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®