Re: [PATCH] soc: qcom: qcom_stats: Add support for NSP subsystem stats

From: Navya Malempati

Date: Thu Oct 01 2026 - 06:21:39 EST




On 9/21/2026 8:57 PM, Pankaj Patil wrote:
On 9/18/2026 2:04 PM, Konrad Dybcio wrote:
On 9/15/26 6:09 AM, Navya Malempati wrote:


On 9/8/2026 3:33 PM, Pankaj Patil wrote:
On 9/8/2026 1:43 PM, Navya Malempati wrote:
Add SMEM items for four NSP subsystems stats which are present in Nord
SoC. Rename CDSP stats as CDSP_NSP as both use same PID and SMEM item
id. Add new entries for NSP1/2/3.

For other targets as well is the same applicable? NSP and CDSP are interchangeable?

From the stats point of view, they are the same, we used the name NSP in downstream, it looks like Nord SoC remoteproc is using the name CDSP [1]

[1] https://lore.kernel.org/linux-arm-msm/20260904081619.593602-2-shengchao.guo@xxxxxxxxxxxxxxxx/


Downstream conventions can't be added upstream, if upstream dt entries
are not named the same way. Please revert this


This is upstream convention only. You can find that the name NSP was used in upstream as well. The name NSP is in fact used in the CDSP nodes in the same link [1] shared earlier. You can find one such snippet below:

+&remoteproc_cdsp0 {
+ clocks = <&rpmhcc RPMH_CXO_CLK>;
+ clock-names = "xo";
+ interconnects = <&nsp_data_noc_0 MASTER_NSP0_PROC QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>;
+ power-domains = <&rpmhpd RPMHPD_CX>,
+ <&rpmhpd RPMHPD_NMXC>,
+ <&rpmhpd RPMHPD_NSP0>;
+ power-domain-names = "cx",
+ "mx",
+ "nsp";
+};

[1] https://lore.kernel.org/linux-arm-msm/20260904081619.593602-2-shengchao.guo@xxxxxxxxxxxxxxxx/


Signed-off-by: Navya Malempati <navya.malempati@xxxxxxxxxxxxxxxx>
---
  drivers/soc/qcom/qcom_stats.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/soc/qcom/qcom_stats.c b/drivers/soc/qcom/qcom_stats.c
index 06923408bfce..91f2d1293124 100644
--- a/drivers/soc/qcom/qcom_stats.c
+++ b/drivers/soc/qcom/qcom_stats.c
@@ -43,8 +43,11 @@ static const struct subsystem_data subsystems[] = {
      { "modem", 605, 1 },
      { "wpss", 605, 13 },
      { "adsp", 606, 2 },
-    { "cdsp", 607, 5 },
+    { "cdsp_nsp", 607, 5 },
      { "cdsp1", 607, 12 },

Is cdsp1 not the same as nsp1?

No, cdsp1 is not the same as nsp1.

Please explain if the dt entries are named as remoteproc_cdspx then what
does cdsp_nspx correspond to? Subsystems are common across all soc's


Subsystems are not common across all SoCs. Few SoCs have only CDSP, while few use NSP. From the stats driver perspective it has to read the SMEM items using the processor ID which matches for both cdsp and nsp subsystems.

Thanks,
Navya