diff options
| author | AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> | 2026-01-23 10:20:31 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-01-23 19:24:38 +0100 |
| commit | 63cbabb003ba314be113700ca58ec320b6ce2b33 (patch) | |
| tree | 3f2b137a1b0706f726125bff1e4bf285f7a56f33 /tools/perf/scripts/python | |
| parent | 078117963b2c678921c86f2485b0d5baf5b86131 (diff) | |
| download | linux-63cbabb003ba314be113700ca58ec320b6ce2b33.tar.gz linux-63cbabb003ba314be113700ca58ec320b6ce2b33.zip | |
spmi: mtk-pmif: Keep spinlock until read is fully done
Move the spin unlocking to after reading the contents of the
PMIF_SWINF_(x)_RDATA_31_0 register in pmif_spmi_read_cmd():
since this is the only register that we can read to get the
data from all of the arbitered busses, a concurrent request
for reading (especially on a busy arbiter) will show a race
condition and a unexpected or corrupted value may be read.
Doing the entire read sequence while spin locked guarantees
that concurrent access to the arbiter doesn't happen.
Fixes: f200fff8d019 ("spmi: mtk-pmif: Serialize PMIF status check and command submission")
Reviewed-by: NĂcolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Fixes: b45b3ccef8c0 ("spmi: mediatek: Add support for MT6873/8192")
Link: https://patch.msgid.link/20260123182039.224314-4-sboyd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
