summaryrefslogtreecommitdiff
path: root/scripts/stackusage
diff options
context:
space:
mode:
authorChristian Loehle <christian.loehle@arm.com>2026-09-16 17:27:49 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-09-18 17:29:07 +0200
commit50affbde6410825b7bd6c0f4d12dab40ec987021 (patch)
treeb374807fb543b67258d3e7aea37f7011c267ed34 /scripts/stackusage
parent3685d9829c7161a05d338cb3b3367c6a76d38ed8 (diff)
downloadlinux-50affbde6410825b7bd6c0f4d12dab40ec987021.tar.gz
linux-50affbde6410825b7bd6c0f4d12dab40ec987021.zip
ACPI: CPPC: Serialize PCC single-register payload updates
The PCC doorbell protocol requires OSPM to confirm ownership of the shared subspace before placing a command and its payload there. cppc_set_reg_val_in_pcc() instead modifies the payload before taking pcc_lock. A concurrent command can consequently overwrite or consume the staged value, and OSPM can write the shared region while the platform still owns it. Reject a register width which cpc_write() cannot stage before taking the exclusive lock. Otherwise that operation can steal Phase II from an older valid performance batch and then abort it for an unrelated error. Take the PCC write lock first, wait for the previous command to complete, and keep the lock held while staging the value and submitting CMD_WRITE. This follows the ownership sequence in ACPI 6.5 Section 14.5 and the existing contract documented by send_pcc_cmd(). If ownership acquisition or staging fails, abort any older performance batch before dropping the exclusive lock. This advances its generation and wakes cppc_set_perf() callers which otherwise wait indefinitely for a command this path did not submit. The generation counter is local to each PCC subspace, while error completion scans the descriptors of every CPU. Match both the subspace and generation so failure in one subspace cannot poison a request using the same generation in another. Fixes: e05c75072c2e ("ACPI: CPPC: Add cppc_set_reg_val()") Reported-by: Sashiko <sashiko-bot@kernel.org> Link: https://sashiko.dev/#/patchset/20260724134251.1632824-1-christian.loehle%40arm.com Link: https://sashiko.dev/#/patchset/20260807111303.1062391-1-christian.loehle%40arm.com Signed-off-by: Christian Loehle <christian.loehle@arm.com> Tested-by: Sumit Gupta <sumitg@nvidia.com> Link: https://patch.msgid.link/20260916162805.1039247-5-christian.loehle@arm.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions