Linux Power Management development
 help / color / mirror / Atom feed
From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Mario Limonciello <mario.limonciello@amd.com>
Cc: <linux-pm@vger.kernel.org>, Sashiko <sashiko-bot@kernel.org>,
	"Mario Limonciello (AMD)" <superm1@kernel.org>
Subject: Re: [PATCH v2 0/7] cpufreq: amd-pstate: Fix a batch of correctness bugs
Date: Mon, 30 Nov 2026 09:26:27 +0530	[thread overview]
Message-ID: <ef80ae58-69c7-44b2-a515-4cfeced52a6d@amd.com> (raw)
In-Reply-To: <20261117-superm1-linux-fabc6bcb-984e-4ba7-bb57-02cc3af08fa7-v2-0-2a0048f563c7@amd.com>

Hello Mario,

On 11/18/2026 8:57 AM, Mario Limonciello wrote:
> This series fixes six independent bugs in the amd-pstate cpufreq driver
> and its unit test module. They were reported by automated code review
> and each is fixed in its own patch:
> 
>  - amd_prefcore_param() dereferenced a NULL string when "amd_prefcore"
>    was passed on the kernel command line without a value, panicking
>    early in boot.
>  - shmem_get_epp() applied the bits 31:24 mask to the unshifted 8-bit
>    value returned by cppc_get_epp_perf(), so it always returned 0 on
>    shared-memory CPPC systems and the firmware default EPP was lost.
>  - amd_pstate_init_freq() passed the quirk lowest_freq (MHz) to
>    freq_to_perf() together with a nominal_freq in kHz, which produced a
>    bogus lowest_perf.
>  - get_mode_idx_from_str() matched any prefix of a mode name, so writing
>    e.g. "undefi" to the status sysfs file was silently accepted instead
>    of returning -EINVAL.
>  - amd_pstate_ut_epp() leaked a platform profile device and left the
>    EPP state modified when dynamic EPP was originally disabled.
>  - amd_pstate_update_min_max_limit() read policy->min/max multiple times
>    without holding policy->rwsem, so the programmed perf limits could
>    disagree with the cached limit frequencies.
> 
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>

I gave this a spin when it came out but forgot to update! Feel free to
include:

Reviewed-by: K Prateek Nayak <kprateek.nayak@amd.com>
Tested-by: K Prateek Nayak <kprateek.nayak@amd.com>

-- 
Thanks and Regards,
Prateek


  parent reply	other threads:[~2026-11-30  3:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18  3:27 [PATCH v2 0/7] cpufreq: amd-pstate: Fix a batch of correctness bugs Mario Limonciello
2026-11-18  3:27 ` [PATCH v2 1/7] cpufreq: amd-pstate: Fix NULL dereference in amd_prefcore_param() Mario Limonciello
2026-11-18  3:27 ` [PATCH v2 2/7] cpufreq/amd-pstate: Fix EPP extraction in shmem_get_epp() Mario Limonciello
2026-11-18  3:27 ` [PATCH v2 3/7] cpufreq/amd-pstate: Fix unit mismatch in amd_pstate_init_freq() Mario Limonciello
2026-11-18  3:27 ` [PATCH v2 4/7] cpufreq: amd-pstate: Require exact mode string match Mario Limonciello
2026-11-18  3:27 ` [PATCH v2 5/7] cpufreq/amd-pstate-ut: Restore EPP state at end of amd_pstate_ut_epp() Mario Limonciello
2026-11-18  3:27 ` [PATCH v2 6/7] cpufreq/amd-pstate: Snapshot policy limits in amd_pstate_update_min_max_limit() Mario Limonciello
2026-11-18  3:27 ` [PATCH v2 7/7] cpufreq: amd-pstate: Preserve names for aliased EPP values Mario Limonciello
2026-11-30  3:56 ` K Prateek Nayak [this message]
2026-11-30  4:21 ` [PATCH v2 0/7] cpufreq: amd-pstate: Fix a batch of correctness bugs K Prateek Nayak
2026-11-30 14:04   ` 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=ef80ae58-69c7-44b2-a515-4cfeced52a6d@amd.com \
    --to=kprateek.nayak@amd.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=sashiko-bot@kernel.org \
    --cc=superm1@kernel.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