[PATCH] soc: qcom: smsm: Increase SMSM_DEFAULT_NUM_HOSTS to 5
From: Vishnu Santhosh
Date: Thu Jun 11 2026 - 01:57:22 EST
SMEM_SMSM_SIZE_INFO (id 419) is not populated by the boot firmware on
Qualcomm Shikra SoC. The SMSM driver falls back to
SMSM_DEFAULT_NUM_HOSTS when this segment is absent, which causes
SMEM_SMSM_CPU_INTR_MASK (id 333) to be allocated with the wrong size.
SMEM_SMSM_CPU_INTR_MASK is sized as SMSM_DEFAULT_NUM_ENTRIES *
SMSM_DEFAULT_NUM_HOSTS * sizeof(u32). With SMSM_DEFAULT_NUM_ENTRIES
fixed at 8, the current SMSM_DEFAULT_NUM_HOSTS of 3 allocates 96
bytes. Qualcomm Shikra SoC modem firmware expects 160 bytes,
requiring SMSM_DEFAULT_NUM_HOSTS to be 5. The size mismatch causes
the modem to crash on boot with "smsm.c: Bad pointer from smem_alloc".
Increase SMSM_DEFAULT_NUM_HOSTS to 5 to match the modem firmware
expectation and prevent the boot crash.
Co-developed-by: Deepak Kumar Singh <deepak.singh@xxxxxxxxxxxxxxxx>
Signed-off-by: Deepak Kumar Singh <deepak.singh@xxxxxxxxxxxxxxxx>
Signed-off-by: Vishnu Santhosh <vishnu.santhosh@xxxxxxxxxxxxxxxx>
---
drivers/soc/qcom/smsm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/qcom/smsm.c b/drivers/soc/qcom/smsm.c
index 021e9d1f61dc5200514c5a239d52be97f7e82825..7d1823ab4198bbfa01cd1cf9c33999b32e2490a3 100644
--- a/drivers/soc/qcom/smsm.c
+++ b/drivers/soc/qcom/smsm.c
@@ -54,7 +54,7 @@
* Default sizes, in case SMEM_SMSM_SIZE_INFO is not found.
*/
#define SMSM_DEFAULT_NUM_ENTRIES 8
-#define SMSM_DEFAULT_NUM_HOSTS 3
+#define SMSM_DEFAULT_NUM_HOSTS 5
struct smsm_entry;
struct smsm_host;
---
base-commit: 9716c086c8e8b141d35aa61f2e96a2e83de212a7
change-id: 20260527-qcom-smsm-default-num-hosts-c471f9c4311a
Best regards,
--
Vishnu Santhosh <vishnu.santhosh@xxxxxxxxxxxxxxxx>