Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

remoteproc: qcom: pas: Shutdown lite ADSP DTB on X1E

The ADSP firmware on X1E has separate firmware binaries for the main
firmware and the DTB. The same applies for the "lite" firmware loaded by
the boot firmware.

When preparing to load the new ADSP firmware we shutdown the lite_pas_id
for the main firmware, but we don't shutdown the corresponding lite pas_id
for the DTB. The fact that we're leaving it "running" forever becomes
obvious if you try to reuse (or just access) the memory region used by the
"lite" firmware: The &adsp_boot_mem is accessible, but accessing the
&adsp_boot_dtb_mem results in a crash.

We don't support reusing the memory regions currently, but nevertheless we
should not keep part of the lite firmware running. Fix this by adding the
lite_dtb_pas_id and shutting it down as well.

We don't have a way to detect if the lite firmware is actually running yet,
so ignore the return status of qcom_scm_pas_shutdown() for now. This was
already the case before, the assignment to "ret" is not used anywhere.

Fixes: 62210f7509e1 ("remoteproc: qcom_q6v5_pas: Unload lite firmware on ADSP")
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Link: https://lore.kernel.org/r/20250820-rproc-qcom-q6v5-fixes-v2-3-910b1a3aff71@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>

authored by

Stephan Gerhold and committed by
Bjorn Andersson
14296496 54898664

+6
+6
drivers/remoteproc/qcom_q6v5_pas.c
··· 42 42 int pas_id; 43 43 int dtb_pas_id; 44 44 int lite_pas_id; 45 + int lite_dtb_pas_id; 45 46 unsigned int minidump_id; 46 47 bool auto_boot; 47 48 bool decrypt_shutdown; ··· 81 80 int pas_id; 82 81 int dtb_pas_id; 83 82 int lite_pas_id; 83 + int lite_dtb_pas_id; 84 84 unsigned int minidump_id; 85 85 int crash_reason_smem; 86 86 unsigned int smem_host_id; ··· 228 226 229 227 if (pas->lite_pas_id) 230 228 ret = qcom_scm_pas_shutdown(pas->lite_pas_id); 229 + if (pas->lite_dtb_pas_id) 230 + qcom_scm_pas_shutdown(pas->lite_dtb_pas_id); 231 231 232 232 if (pas->dtb_pas_id) { 233 233 ret = request_firmware(&pas->dtb_firmware, pas->dtb_firmware_name, pas->dev); ··· 726 722 pas->minidump_id = desc->minidump_id; 727 723 pas->pas_id = desc->pas_id; 728 724 pas->lite_pas_id = desc->lite_pas_id; 725 + pas->lite_dtb_pas_id = desc->lite_dtb_pas_id; 729 726 pas->info_name = desc->sysmon_name; 730 727 pas->smem_host_id = desc->smem_host_id; 731 728 pas->decrypt_shutdown = desc->decrypt_shutdown; ··· 1090 1085 .pas_id = 1, 1091 1086 .dtb_pas_id = 0x24, 1092 1087 .lite_pas_id = 0x1f, 1088 + .lite_dtb_pas_id = 0x29, 1093 1089 .minidump_id = 5, 1094 1090 .auto_boot = true, 1095 1091 .proxy_pd_names = (char*[]){