linux/drivers/soc/qcom
Manivannan Sadhasivam 4b3ec6b6ff qcom: llcc/edac: Fix the base address used for accessing LLCC banks
[ Upstream commit ee13b50087 ]

The Qualcomm LLCC/EDAC drivers were using a fixed register stride for
accessing the (Control and Status Registers) CSRs of each LLCC bank.
This stride only works for some SoCs like SDM845 for which driver
support was initially added.

But the later SoCs use different register stride that vary between the
banks with holes in-between. So it is not possible to use a single register
stride for accessing the CSRs of each bank. By doing so could result in a
crash.

For fixing this issue, let's obtain the base address of each LLCC bank from
devicetree and get rid of the fixed stride. This also means, there is no
need to rely on reg-names property and the base addresses can be obtained
using the index.

First index is LLCC bank 0 and last index is LLCC broadcast. If the SoC
supports more than one bank, then those need to be defined in devicetree
for index from 1..N-1.

Reported-by: Parikshit Pareek <quic_ppareek@quicinc.com>
Tested-by: Luca Weiss <luca.weiss@fairphone.com>
Tested-by: Steev Klimaszewski <steev@kali.org> # Thinkpad X13s
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sa8540p-ride
Reviewed-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230314080443.64635-13-manivannan.sadhasivam@linaro.org
Stable-dep-of: cbd77119b6 ("EDAC/qcom: Get rid of hardcoded register offsets")
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2023-06-21 16:00:51 +02:00
..
apr.c soc: qcom: apr: Make qcom,protection-domain optional again 2023-01-24 07:24:44 +01:00
cmd-db.c soc: qcom: cmd-db: replace strscpy_pad() with strncpy() 2022-06-28 14:44:44 -05:00
cpr.c PM: AVS: qcom-cpr: Fix an error handling path in cpr_probe() 2023-02-01 08:34:08 +01:00
icc-bwmon.c soc: qcom: icc-bwmon: fix incorrect error code passed to dev_err_probe() 2023-06-14 11:15:28 +02:00
Kconfig soc: qcom: Select REMAP_MMIO for ICC_BWMON driver 2023-01-07 11:11:36 +01:00
kryo-l2-accessors.c soc: qcom: kryo-l2-accessors: Fix misnaming of 'val' 2020-11-10 23:23:02 -06:00
llcc-qcom.c qcom: llcc/edac: Fix the base address used for accessing LLCC banks 2023-06-21 16:00:51 +02:00
Makefile soc: qcom: icc-bwmon: Add bandwidth monitoring driver 2022-07-06 15:57:51 -05:00
mdt_loader.c soc: qcom: correct kerneldoc 2022-06-25 22:05:31 -05:00
ocmem.c soc: qcom: ocmem: Fix refcount leak in of_get_ocmem 2022-06-30 21:50:46 -05:00
pdr_interface.c soc: qcom: pdr: replace usage of found with dedicated list iterator variable 2022-04-07 22:20:27 -05:00
pdr_internal.h soc: qcom: pdr: use static for servreg_* variables 2022-05-05 22:08:15 -05:00
qcom-geni-se.c soc: qcom: geni: Disable MMIO tracing for GENI SE 2022-06-15 17:41:12 +02:00
qcom_aoss.c soc: qcom: aoss: Fix refcount leak in qmp_cooling_devices_register 2022-06-30 22:03:58 -05:00
qcom_gsbi.c soc: qcom: gsbi: Make use of the helper function devm_platform_ioremap_resource() 2021-09-21 17:41:48 -05:00
qcom_stats.c soc: qcom: stats: Populate all subsystem debugfs files 2023-03-11 13:55:22 +01:00
qmi_encdec.c soc: qcom: qmi: use const for struct qmi_elem_info 2022-08-29 17:33:01 -05:00
qmi_interface.c soc: qcom: qmi: use const for struct qmi_elem_info 2022-08-29 17:33:01 -05:00
rmtfs_mem.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
rpmh-internal.h soc: qcom: rpmh-rsc: Sleep waiting for tcs slots to be free 2020-09-10 16:56:12 +00:00
rpmh-rsc.c soc: qcom: rpmh-rsc: Fix typo in a comment 2021-12-20 19:10:11 -06:00
rpmh.c soc: qcom: rpmh: Use __fill_rpmh_msg API during rpmh_write() 2020-11-26 11:43:00 -06:00
rpmhpd.c soc: qcom: rpmhpd: fix typos in comment 2022-06-25 22:36:13 -05:00
rpmpd.c soc: qcom: rpmpd: Add SM6375 support 2022-09-13 22:25:35 -05:00
smd-rpm.c soc: qcom: smd-rpm: Add compatible for MSM8909 2022-07-18 18:05:07 -05:00
smem.c soc: qcom: smem: use correct format characters 2022-07-04 14:26:51 +02:00
smem_state.c soc: qcom: smem_state: Add refcounting for the 'state->of_node' 2022-08-18 14:13:46 -05:00
smp2p.c soc: qcom: correct kerneldoc 2022-06-25 22:05:31 -05:00
smsm.c soc: qcom: smsm: Fix refcount leak bugs in qcom_smsm_probe() 2022-08-18 14:13:46 -05:00
socinfo.c soc: qcom: socinfo: Add PM6125 ID 2022-08-18 14:13:46 -05:00
spm.c soc: qcom: spm: Add CPU data for MSM8909 2022-07-18 18:05:07 -05:00
trace-rpmh.h drivers: qcom: rpmh-rsc: log RPMH requests in FTRACE 2018-07-21 13:32:31 -05:00
wcnss_ctrl.c soc: qcom: wcnss_ctrl: Allow reading firmware-name from DT 2021-04-05 22:35:06 -05:00