Re: [PATCH 2/3] soc: qcom: stats: Add stats compatible and config for Shikra
From: Konrad Dybcio
Date: Mon Jul 06 2026 - 06:07:29 EST
On 7/3/26 1:13 PM, Sneh Mankad wrote:
> SoC sleep stats are present in RPM message RAM and subsystem sleep
> stats are present in SMEM for Shikra.
>
> For earlier targets using RPM processor like msm8974, rpm_master_stat.c
> was used for subsystem sleep stats since those stats were populated in
> RPM MSGRAM.
>
> Here is a brief summary of previous targets and their stats
> configuration, along with the drivers used to display them.
>
> +---------------|----------------------------|---------------------------+
> | SoC | subsystem sleep stats | SoC sleep stats |
> |---------------|----------------------------|---------------------------|
> | msm8974, | RPM processor MSGRAM | RPM processor MSGRAM |
> | msm8226 | (rpm_master_stat.c) | (qcom_stats.c) |
> |---------------|----------------------------|---------------------------|
> | sm6350, | SMEM (DDR) | AOP processor MSGRAM |
> | sdm845, etc. | (qcom_stats.c) | (qcom_stats.c) |
> |---------------|----------------------------|---------------------------|
> | Shikra | SMEM (DDR) | RPM processor MSGRAM |
> | | (qcom_stats.c) | (qcom_stats.c) |
> +---------------|----------------------------|---------------------------+
>
> qcom_stats.c supports both the configurations for shikra, reading
> subsystem sleep stats from SMEM and reading SoC sleep stats from RPM
> MSGRAM.
>
> A generic "qcom,rpm-stats" compatible only reads SoC sleep stats like vmin
> and vlow. Add shikra rpm compatible and config to read subsystem sleep
> stats too along with SoC sleep stats.
>
> Below is an example showing sleep stats for "apss" subsystem with this
> change:
>
> cat /sys/kernel/debug/qcom_stats/apss
> Count: 2192
> Last Entered At: 5498618336
> Last Exited At: 5498708046
> Accumulated Duration: 2046572620.
>
> Signed-off-by: Sneh Mankad <sneh.mankad@xxxxxxxxxxxxxxxx>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
Konrad