twx-linux/include/linux/firmware
Bartosz Golaszewski dc3f4e75c5 firmware: qcom: scm: take struct device as argument in SHM bridge enable
qcom_scm_shm_bridge_enable() is used early in the SCM initialization
routine. It makes an SCM call and so expects the internal __scm pointer
in the SCM driver to be assigned. For this reason the tzmem memory pool
is allocated *after* this pointer is assigned. However, this can lead to
a crash if another consumer of the SCM API makes a call using the memory
pool between the assignment of the __scm pointer and the initialization
of the tzmem memory pool.

As qcom_scm_shm_bridge_enable() is a special case, not meant to be
called by ordinary users, pull it into the local SCM header. Make it
take struct device as argument. This is the device that will be used to
make the SCM call as opposed to the global __scm pointer. This will
allow us to move the tzmem initialization *before* the __scm assignment
in the core SCM driver.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250630-qcom-scm-race-v2-2-fa3851c98611@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2025-07-16 22:50:55 -05:00
..
broadcom
cirrus firmware: cs_dsp: test_bin_error: Fix uninitialized data used as fw version 2025-04-10 14:47:14 +01:00
imx firmware: imx: Add i.MX95 SCMI CPU driver 2025-04-14 13:55:04 +01:00
intel
mediatek ASoC: SOF: mediatek: Constify struct mtk_adsp_ipc_ops 2024-06-17 13:08:31 +01:00
meson drivers: meson: sm: correct meson_sm_* API retval handling 2023-09-11 11:45:26 +02:00
qcom firmware: qcom: scm: take struct device as argument in SHM bridge enable 2025-07-16 22:50:55 -05:00
samsung firmware: exynos-acpm: introduce devm_acpm_get_by_node() 2025-04-22 09:50:06 +02:00
thead firmware: thead: Add AON firmware protocol driver 2025-03-13 14:41:32 +01:00
trusted_foundations.h
xlnx-event-manager.h soc: xilinx: Add cb event for subsystem restart 2024-06-03 13:07:56 +02:00
xlnx-zynqmp.h This is the bulk of the pin control changes for v6.13: 2024-11-25 17:24:51 -08:00