]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ACPI: CPPC: Skip writes to unsupported performance controls
authorChristian Loehle <christian.loehle@arm.com>
Fri, 24 Jul 2026 10:40:42 +0000 (11:40 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 27 Jul 2026 13:18:50 +0000 (15:18 +0200)
commit47d4e945dff8139050473be4ab263a32e1da910c
tree1aafc62a2e706dbe40d0f030670524fad0d8be13
parent601eecdeee046d23dc313f57770ce085c8da602f
ACPI: CPPC: Skip writes to unsupported performance controls

MIN_PERF and MAX_PERF are optional CPPC controls. DESIRED_PERF is also
optional with CPPC2 when autonomous selection is supported.

The cppc-cpufreq target callbacks populate both limits for every request
without checking whether the controls are implemented. cppc_set_perf()
consequently passes NULL register descriptors to cpc_write(). The writes
fail width validation and their return values are ignored, so the failed
access paths are repeated on every target request. An autonomous-only
platform can take the same path for DESIRED_PERF.

Check that each performance control is supported before calling
cpc_write().

Fixes: ea3db45ae476 ("cpufreq: cppc: Update MIN_PERF/MAX_PERF in target callbacks")
Reviewed-by: Sumit Gupta <sumitg@nvidia.com>
Signed-off-by: Christian Loehle <christian.loehle@arm.com>
Reviewed-by: Lifeng Zheng <zhenglifeng1@huawei.com>
Link: https://patch.msgid.link/20260724104042.1481804-1-christian.loehle@arm.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/cppc_acpi.c