[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0hARyNh3FpfRNN0F=X1Yg0=3JS-yzC1ufkzt9i49nzfjQ@mail.gmail.com>
Date: Mon, 15 Dec 2025 12:57:30 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Pengjie Zhang <zhangpengjie2@...wei.com>
Cc: rafael@...nel.org, lenb@...nel.org, srinivas.pandruvada@...ux.intel.com,
linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
zhanjie9@...ilicon.com, zhenglifeng1@...wei.com, lihuisong@...wei.com,
yubowen8@...wei.com, linhongye@...artners.com, linuxarm@...wei.com,
jonathan.cameron@...wei.com, wangzhi12@...wei.com
Subject: Re: [PATCH] ACPI: CPPC: Fix missing PCC check for guaranteed
On Wed, Dec 10, 2025 at 2:22 PM Pengjie Zhang <zhangpengjie2@...wei.com> wrote:
>
> the current implementation overlooks the 'guaranteed_perf'
> register in this check.
>
> If the Guaranteed Performance register is located in the PCC
> subspace, the function currently attempts to read it without
> acquiring the lock and without sending the CMD_READ doorbell
> to the firmware. This can result in reading stale data.
>
> Fixes: 29523f095397 ("ACPI / CPPC: Add support for guaranteed performance")
> Signed-off-by: Pengjie Zhang <zhangpengjie2@...wei.com>
> ---
> drivers/acpi/cppc_acpi.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
> index 3bdeeee3414e..e66e20d1f31b 100644
> --- a/drivers/acpi/cppc_acpi.c
> +++ b/drivers/acpi/cppc_acpi.c
> @@ -1366,7 +1366,8 @@ int cppc_get_perf_caps(int cpunum, struct cppc_perf_caps *perf_caps)
> /* Are any of the regs PCC ?*/
> if (CPC_IN_PCC(highest_reg) || CPC_IN_PCC(lowest_reg) ||
> CPC_IN_PCC(lowest_non_linear_reg) || CPC_IN_PCC(nominal_reg) ||
> - CPC_IN_PCC(low_freq_reg) || CPC_IN_PCC(nom_freq_reg)) {
> + CPC_IN_PCC(low_freq_reg) || CPC_IN_PCC(nom_freq_reg) ||
> + CPC_IN_PCC(guaranteed_reg)) {
> if (pcc_ss_id < 0) {
> pr_debug("Invalid pcc_ss_id\n");
> return -ENODEV;
> --
Applied as 6.19-rc material, thanks!
Powered by blists - more mailing lists