Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPI: CPPC: Fix missing PCC check for guaranteed_perf

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@huawei.com>
Cc: 4.20+ <stable@vger.kernel.org> # 4.20+
[ rjw: Subject and changelog edits ]
Link: https://patch.msgid.link/20251210132227.1988380-1-zhangpengjie2@huawei.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Pengjie Zhang and committed by
Rafael J. Wysocki
6ea3a44c 8f0b4cce

+2 -1
+2 -1
drivers/acpi/cppc_acpi.c
··· 1366 1366 /* Are any of the regs PCC ?*/ 1367 1367 if (CPC_IN_PCC(highest_reg) || CPC_IN_PCC(lowest_reg) || 1368 1368 CPC_IN_PCC(lowest_non_linear_reg) || CPC_IN_PCC(nominal_reg) || 1369 - CPC_IN_PCC(low_freq_reg) || CPC_IN_PCC(nom_freq_reg)) { 1369 + CPC_IN_PCC(low_freq_reg) || CPC_IN_PCC(nom_freq_reg) || 1370 + CPC_IN_PCC(guaranteed_reg)) { 1370 1371 if (pcc_ss_id < 0) { 1371 1372 pr_debug("Invalid pcc_ss_id\n"); 1372 1373 return -ENODEV;