The pd-mapper auxiliary device is created by the Qualcomm remoteproc
framework, but the qcom_pd_mapper module that binds to it may be loaded
later (asynchronously).
As a result, the remote processor can be brought up before the PD Mapper
service becomes available. When this happens, firmware running on the
remote processor may attempt to access the PD Mapper service before it is
ready, leading to failures such as firmware crashes or watchdog timeouts.
Declare qcom_pd_mapper as a pre-soft dependency of qcom_common so that
the PD Mapper module is loaded before the remoteproc DSP is brought up.
This gives qcom_pd_mapper an opportunity to bind to the pd-mapper
auxiliary device and make the PD Mapper service available before the
remote processor starts accessing it.
The soft dependency only enforces module load ordering and does not
create a hard dependency. If qcom_pd_mapper is unavailable, modprobe
will still load qcom_common. Likewise, it does not guarantee that
qcom_pd_mapper has completed probing before the remote processor boots,
but in practice it eliminates the observed boot-time race by ensuring
the mapper is loaded first.
Without this ordering, WiFi and modem watchdog timeouts are observed
during cold boot on Agatti and Arduino UNO Q platforms.
[ 19.955751] remoteproc remoteproc0: powering up modem
[ 20.069985] remoteproc remoteproc0: Booting fw image qcom/qcm2290/modem.mbn,
size 8881672
[ 20.310311] remoteproc remoteproc0: remote processor modem is now up
[ 60.320801] qcom_q6v5_pas 6080000.remoteproc: fatal error received:
dog_hal_common.c:173:DOG detects stalled initialization, triage with IMAGE OWNER
[ 60.320868] remoteproc remoteproc0: crash detected in modem: type fatal error
[ 60.320881] remoteproc remoteproc0: handling crash #1 in modem
The modem eventually recovers after the crash, but this delays the
availability of the WiFi feature.
Fixes: 5b9f51b200dc ("remoteproc: qcom: enable in-kernel PD mapper")
Signed-off-by: Loic Poulain <[email protected]>
---
drivers/remoteproc/qcom_common.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/remoteproc/qcom_common.c b/drivers/remoteproc/qcom_common.c
index
5294e327f1587efc917eb01dde59bd1e723c225e..0dfe9f16eed328807f178e0399b11f2c819bb270
100644
--- a/drivers/remoteproc/qcom_common.c
+++ b/drivers/remoteproc/qcom_common.c
@@ -627,3 +627,6 @@ EXPORT_SYMBOL_GPL(qcom_remove_pdm_subdev);
MODULE_DESCRIPTION("Qualcomm Remoteproc helper driver");
MODULE_LICENSE("GPL v2");
+
+/* Ensure the PD mapper is loaded before remote processor bring-up */
+MODULE_SOFTDEP("pre: qcom_pd_mapper");
---
base-commit: 786262be6048deab760f68c8acc2c85607165894
change-id: 20260901-fix-ath10k-remoteproc-crash-420ee2456e92
Best regards,
--
Loic Poulain <[email protected]>