]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
soc: qcom: llcc: Add per-slice counter and common llcc slice descriptor
authorUnnathi Chalicheemala <unnathi.chalicheemala@oss.qualcomm.com>
Fri, 6 Mar 2026 03:12:05 +0000 (19:12 -0800)
committerBjorn Andersson <andersson@kernel.org>
Mon, 16 Mar 2026 01:33:55 +0000 (20:33 -0500)
commit45c2a55d13c698ba6a281315676934c44225b034
tree5928a24d33eca6e0fab070b898e39dfb011dad6c
parent3fa036c08938d37c4bc79d125974bb87b4122ac4
soc: qcom: llcc: Add per-slice counter and common llcc slice descriptor

Fix incorrect slice activation/deactivation accounting by replacing the
bitmap-based activation tracking with per-slice atomic reference counters.
This resolves mismatches that occur when multiple client drivers vote for
the same slice or when llcc_slice_getd() is called multiple times.

As part of this fix, simplify slice descriptor handling by eliminating
dynamic allocation. llcc_slice_getd() now returns a pointer to a
preallocated descriptor, removing the need for repeated allocation/free
cycles and ensuring consistent reference tracking across all users.

Signed-off-by: Unnathi Chalicheemala <unnathi.chalicheemala@oss.qualcomm.com>
Signed-off-by: Francisco Munoz Ruiz <francisco.ruiz@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260305-external_llcc_changes1set-v1-1-6347e52e648e@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/soc/qcom/llcc-qcom.c
include/linux/soc/qcom/llcc-qcom.h