Skip to content

Introduce RPM Master stats

Konrad Dybcio linux-arm-msm linux-devicetree lkml 6 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected] change-id 20230405-topic-master_stats-ba201a9af93d

Versions newest first

  1. v6 Latest2 patches 1 replyApplied
  2. v52 patches 1 replySuperseded
  3. v42 patches 3 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v32 patches5 repliesSuperseded
v22 patches2 repliesSuperseded
v12 patches1 replySuperseded

Changes in v6 from the cover letter

- pick up tags
- fix 'decisons' -> 'decisions' typo

Patches in v6 Applied

#Subject and filesSizeRepliesApplied
1/2dt-bindings: soc: qcom: Add RPM Master statsDocumentation/devicetree/bindings/soc/qcom/qcom,rpm-master-stats.yaml+69 -00 replies
2/2soc: qcom: Introduce RPM master stats driverdrivers/soc/qcom/Kconfig drivers/soc/qcom/Makefile drivers/soc/qcom/rpm_master_stats.c+175 -00 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchKrzysztof KozlowskiManivannan Sadhasivam
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 0/2] Introduce RPM Master stats

v5 -> v6:
- pick up tags
- fix 'decisons' -> 'decisions' typo

v5: https://lore.kernel.org/r/[email protected]

v4 -> v5:
- pick up tags
- uintXY_t -> uXY
- driver.name = "rpm_master_stats" -> "qcom_rpm_master_stats"
- use dev_err_probe for debugfs file creation fail
- use PTR_ERR(dent) intead of -EINVAL for debugfs file creation fail

v4: https://lore.kernel.org/r/[email protected]

v3 -> v4:
- Use "data" instead of "d" for naming local struct master_stats_data *
- Add "qcom_" prefix in the debugfs path
- Add "Qualcomm" prefix in MODULE_NAME
- Make the struct __packed__ to avoid padding surprises (even though it looks like there shouldn't be any, by eye)
- use IS_ERR for checking debugfs_create_file return value instead of nullchecking, that apparently changed..
- Use -ENODEV instead of -EINVAL when a MSG RAM handle is not found
- Add missing of_node_put() after of_parse_phandle()

- Vastly improve the documentation bit

v3: https://lore.kernel.org/r/[email protected]

v2 -> v3:
- rename rpm-master-stats.yaml to qcom,rpm-master-stats.yaml

v2: https://lore.kernel.org/r/[email protected]

v1 -> v2:
- Drop the - in /properties/compatible to make our entry be of the correct type [1/2]
- Change %s to %d for printing out the iterator [2/2]

v1: https://lore.kernel.org/r/[email protected]

The RPM MSG ram includes per-subsystem low-power mode entry/exit/ residence/etc. statistics which are very useful for trying to debug what I'd call "SoC insomnia", or IOW the plaftorm refusing to drop the voltage rails to a minimum and gate the non-critical clocks.

This series adds a very short and simple driver to query that data and expose it through debugfs.

The base used for writing this driver is:
https://github.com/sonyxperiadev/kernel/blob/aosp/LA.UM.9.14.r1/drivers/soc/qcom/rpm_master_stat.c

---
Konrad Dybcio (2):
dt-bindings: soc: qcom: Add RPM Master stats
soc: qcom: Introduce RPM master stats driver

 .../bindings/soc/qcom/qcom,rpm-master-stats.yaml   |  69 +++++++++
 drivers/soc/qcom/Kconfig                           |  11 ++
 drivers/soc/qcom/Makefile                          |   1 +
 drivers/soc/qcom/rpm_master_stats.c                | 163 +++++++++++++++++++++
 4 files changed, 244 insertions(+)

---
base-commit: 67d5d9f013d6c3829383c08162939cabff14fccc
change-id: 20230405-topic-master_stats-ba201a9af93d

Best regards,

Signature · 1 line
Konrad Dybcio <[email protected]>