linux/drivers/soc/qcom
Stephen Boyd 0bf3672946 soc: qcom: stats: Populate all subsystem debugfs files
[ Upstream commit acdbf5f9b2 ]

This driver relies on SMEM to populate items for each subsystem before
the device probes. The items in SMEM that are being looked for are
populated by the subsystems lazily, and therefore may not exist until
the device has booted. For example, if I build this driver into the
kernel on Trogdor Lazor and boot up, I don't see a 'modem' debugfs file
populated, because the modem boots and populates the SMEM item after
this driver probes.

Always populate the files for the subsystems if they're in SMEM, and
make the qcom_subsystem_sleep_stats_show() function return 0 if the SMEM
items still isn't there. This way we can run a simple command like

	grep ^ /sys/kernel/debug/qcom_stats/*

and collect the subsystem sleep stats without interspersed errors or
missing details entirely because this driver probed first.

Fixes: 1d77246903 ("soc: qcom: Add Sleep stats driver")
Cc: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230119032329.2909383-1-swboyd@chromium.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-11 13:55:22 +01:00
..
apr.c soc: qcom: apr: Make qcom,protection-domain optional again 2023-01-24 07:24:44 +01:00
cmd-db.c
cpr.c PM: AVS: qcom-cpr: Fix an error handling path in cpr_probe() 2023-02-01 08:34:08 +01:00
icc-bwmon.c soc: qcom: icc-bwmon: force clear counter/irq registers 2022-09-05 21:51:08 -05:00
Kconfig soc: qcom: Select REMAP_MMIO for ICC_BWMON driver 2023-01-07 11:11:36 +01:00
kryo-l2-accessors.c
llcc-qcom.c soc: qcom: llcc: make irq truly optional 2022-12-31 13:31:49 +01:00
Makefile soc: qcom: icc-bwmon: Add bandwidth monitoring driver 2022-07-06 15:57:51 -05:00
mdt_loader.c
ocmem.c
pdr_interface.c
pdr_internal.h
qcom_aoss.c
qcom_gsbi.c
qcom_stats.c soc: qcom: stats: Populate all subsystem debugfs files 2023-03-11 13:55:22 +01:00
qcom-geni-se.c
qmi_encdec.c soc: qcom: qmi: use const for struct qmi_elem_info 2022-08-29 17:33:01 -05:00
qmi_interface.c soc: qcom: qmi: use const for struct qmi_elem_info 2022-08-29 17:33:01 -05:00
rmtfs_mem.c
rpmh-internal.h
rpmh-rsc.c
rpmh.c
rpmhpd.c
rpmpd.c soc: qcom: rpmpd: Add SM6375 support 2022-09-13 22:25:35 -05:00
smd-rpm.c soc: qcom: smd-rpm: Add compatible for MSM8909 2022-07-18 18:05:07 -05:00
smem_state.c soc: qcom: smem_state: Add refcounting for the 'state->of_node' 2022-08-18 14:13:46 -05:00
smem.c
smp2p.c
smsm.c soc: qcom: smsm: Fix refcount leak bugs in qcom_smsm_probe() 2022-08-18 14:13:46 -05:00
socinfo.c soc: qcom: socinfo: Add PM6125 ID 2022-08-18 14:13:46 -05:00
spm.c soc: qcom: spm: Add CPU data for MSM8909 2022-07-18 18:05:07 -05:00
trace-rpmh.h
wcnss_ctrl.c