From: Marco Scardovi <scardracs@disroot.org>
To: kprateek.nayak@amd.com
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
mario.limonciello@amd.com, perry.yuan@amd.com, rafael@kernel.org,
ray.huang@amd.com, scardracs@disroot.org, stuartmeckle@gmail.com,
viresh.kumar@linaro.org
Subject: [PATCH v6 0/3] cpufreq/amd-pstate: Fix EPP and auto_sel initialization
Date: Tue, 9 Jun 2026 09:29:02 +0200 [thread overview]
Message-ID: <20260609073042.81275-1-scardracs@disroot.org> (raw)
In-Reply-To: <d8bc45af-d8bb-48fb-9f3e-5188c8d79c8e@amd.com>
Hi Mario, Prateek,
no big deal making a v6 with your suggestions. I'm glad this series come to an end
and everything works as expected.
Here is v6 of the series addressing the feedback on EPP and auto_sel initialization.
This version updates the metadata with Reviewed-by and Tested-by tags and applies
a small commit message cleanup.
Changes in v6:
- Add K Prateek Nayak's Reviewed-by and Tested-by tags to all patches.
- Drop the redundant paragraph from the commit message of Patch 3.
Changes in v5:
- Split the single unified patch into a 3-patch series:
- Patch 1: Change EPP helper return types to signed int and add error handling
in amd_pstate_epp_cpu_init().
- Patch 2: Remove the active-mode early return check in shmem_init_perf() to
ensure auto_sel is properly toggled on shared memory systems.
- Patch 3: Cache the initial firmware programmed EPP value in cppc_req_cached.
Changes in v4:
- Refactor EPP getter helper functions (msr_get_epp, shmem_get_epp, and
amd_pstate_get_epp) to return int, conforming to standard kernel practice
for value-or-negative-errno helpers.
- Clean up commit message description to link error propagation directly to
EPP caching.
- Execute the remaining shared-memory initialization path even when booting
in active mode, rather than bypassing it through an early return.
Changes in v3:
- Patch 1: Cache the firmware-programmed default EPP value at CPU EPP
initialization (resolving the boot-time false cache hit) and explicitly
toggle the AUTO_SEL_ENABLE register to 1 on shared memory systems,
rather than utilizing a state-tracking flag as proposed in v2.
- Patch 2: Dropped as CPPC systems universally support EPP.
Changes in v2:
- Patch 1: Rename `epp_initialized` to `epp_hw_programmed` and add a comment
documenting the EPP cache guard optimization behavior.
- Patch 2: Add comments explaining the uniform CPU capability check on x86,
handle EPP capability check errors robustly (only treat -EOPNOTSUPP as
unsupported, warn and assume supported for other errors to avoid false
negatives), and reject runtime active mode transitions at sysfs store time
(preventing the driver from being left in an unregistered state).
Changes in v1:
- Fix the boot-time CPPC EPP/auto_sel initialization regression in
shmem_set_epp() using a state tracking flag while preserving runtime
cache optimization.
- Add an EPP capability check helper during initialization.
- Fall back to passive mode at boot if EPP is not supported, and reject
transitions to active mode at runtime if EPP is not supported.
Marco Scardovi (3):
cpufreq/amd-pstate: Fix EPP return type and handle errors during
initialization
cpufreq/amd-pstate: Toggle auto_sel in active mode on shared memory
systems
cpufreq/amd-pstate: Cache the firmware programmed EPP value
drivers/cpufreq/amd-pstate.c | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
--
2.54.0
next prev parent reply other threads:[~2026-06-09 7:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-05 10:26 [PATCH v3 0/1] cpufreq/amd-pstate: Fix EPP initialization for shared memory systems Marco Scardovi
2026-06-05 10:26 ` [PATCH v3 1/1] " Marco Scardovi
2026-06-05 18:24 ` Mario Limonciello
2026-06-06 6:57 ` [PATCH v4 0/1] " Marco Scardovi
2026-06-06 6:57 ` [PATCH v4 1/1] " Marco Scardovi
2026-06-08 4:21 ` K Prateek Nayak
2026-06-08 7:31 ` [PATCH v5 0/3] cpufreq/amd-pstate: Fix EPP and auto_sel initialization Marco Scardovi
2026-06-08 7:31 ` [PATCH v5 1/3] cpufreq/amd-pstate: Fix EPP return type and handle errors during initialization Marco Scardovi
2026-06-09 4:45 ` K Prateek Nayak
2026-06-08 7:31 ` [PATCH v5 2/3] cpufreq/amd-pstate: Toggle auto_sel in active mode on shared memory systems Marco Scardovi
2026-06-09 4:47 ` K Prateek Nayak
2026-06-08 7:31 ` [PATCH v5 3/3] cpufreq/amd-pstate: Cache the firmware programmed EPP value Marco Scardovi
2026-06-09 4:50 ` K Prateek Nayak
2026-06-09 7:18 ` [PATCH v5 0/3] cpufreq/amd-pstate: Fix EPP and auto_sel initialization K Prateek Nayak
2026-06-09 7:29 ` Marco Scardovi [this message]
2026-06-09 7:29 ` [PATCH v6 1/3] cpufreq/amd-pstate: Fix EPP return type and handle errors during initialization Marco Scardovi
2026-06-09 7:29 ` [PATCH v6 2/3] cpufreq/amd-pstate: Toggle auto_sel in active mode on shared memory systems Marco Scardovi
2026-06-09 7:29 ` [PATCH v6 3/3] cpufreq/amd-pstate: Cache the firmware programmed EPP value Marco Scardovi
2026-06-09 13:48 ` [PATCH v6 0/3] cpufreq/amd-pstate: Fix EPP and auto_sel initialization Mario Limonciello
2026-06-10 7:09 ` Marco Scardovi
2026-06-08 16:06 ` [PATCH v4 1/1] cpufreq/amd-pstate: Fix EPP initialization for shared memory systems Mario Limonciello
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=20260609073042.81275-1-scardracs@disroot.org \
--to=scardracs@disroot.org \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=perry.yuan@amd.com \
--cc=rafael@kernel.org \
--cc=ray.huang@amd.com \
--cc=stuartmeckle@gmail.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®