<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/soc/qcom/qcom_stats.c, branch linux-6.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2023-03-11T12:50:27Z</updated>
<entry>
<title>soc: qcom: stats: Populate all subsystem debugfs files</title>
<updated>2023-03-11T12:50:27Z</updated>
<author>
<name>Stephen Boyd</name>
<email>swboyd@chromium.org</email>
</author>
<published>2023-01-19T03:23:29Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=37b382970207da05d27c9157fc951190b735cd95'/>
<id>urn:sha1:37b382970207da05d27c9157fc951190b735cd95</id>
<content type='text'>
[ Upstream commit acdbf5f9b2c492505145f6e50c65418521a547c4 ]

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: 1d7724690344 ("soc: qcom: Add Sleep stats driver")
Cc: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
Link: https://lore.kernel.org/r/20230119032329.2909383-1-swboyd@chromium.org
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>soc: qcom: stats: Mark device as having no PM support</title>
<updated>2022-10-17T22:58:15Z</updated>
<author>
<name>Stephen Boyd</name>
<email>swboyd@chromium.org</email>
</author>
<published>2022-10-15T00:49:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=367b9c70e9b25fe9ad5346b0f3544682d8b112b9'/>
<id>urn:sha1:367b9c70e9b25fe9ad5346b0f3544682d8b112b9</id>
<content type='text'>
This driver purely exposes information from memory to the kernel. Let's
mark it as not having any device PM functionality, so that during
suspend we skip even trying to call a suspend function on this device.
This clears up suspend logs more than anything else, but it also shaves
a few cycles off suspend.

Cc: Konrad Dybcio &lt;konrad.dybcio@somainline.org&gt;
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
Link: https://lore.kernel.org/r/20221015004934.3930651-2-swboyd@chromium.org
</content>
</entry>
<entry>
<title>soc: qcom: stats: Add SDM845 stats config and compatible</title>
<updated>2022-08-29T21:38:52Z</updated>
<author>
<name>Abel Vesa</name>
<email>abel.vesa@linaro.org</email>
</author>
<published>2022-08-12T10:12:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0425c5c6ebb2388074ea18460199547f076cbf60'/>
<id>urn:sha1:0425c5c6ebb2388074ea18460199547f076cbf60</id>
<content type='text'>
SDM845 is a special case compared to the other platforms that use RPMh
stats, since it only has 2 stats (aosd and cxsd), while the others have
a 3rd one (ddr).

So lets add dedicated stats config and compatible for SDM845 to make the
driver aware of this num_records difference.

Signed-off-by: Abel Vesa &lt;abel.vesa@linaro.org&gt;
Reviewed-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
Link: https://lore.kernel.org/r/20220812101240.1869605-2-abel.vesa@linaro.org
</content>
</entry>
<entry>
<title>soc: qcom: stats: Add fixed sleep stats offset for older RPM firmwares</title>
<updated>2021-12-21T01:10:09Z</updated>
<author>
<name>Stephan Gerhold</name>
<email>stephan@gerhold.net</email>
</author>
<published>2021-11-19T21:39:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=708dbf4490c8ddf55d79b9f3855219b92d108760'/>
<id>urn:sha1:708dbf4490c8ddf55d79b9f3855219b92d108760</id>
<content type='text'>
Not all RPM firmware versions have the dynamic sleep stats offset
available. Most older versions use a fixed offset of 0xdba0.
Add support for this using new SoC-specific compatibles for APQ8084,
MSM8226, MSM8916 and MSM8974.

Even older SoCs seem to use a different offset and stats format.
If needed those could be supported in the future by adding separate
compatibles for those with a different stats_config.

Cc: Maulik Shah &lt;mkshah@codeaurora.org&gt;
Signed-off-by: Stephan Gerhold &lt;stephan@gerhold.net&gt;
Reviewed-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/20211119213953.31970-3-stephan@gerhold.net
</content>
</entry>
<entry>
<title>soc: qcom: qcom_stats: Fix client votes offset</title>
<updated>2021-10-24T04:35:42Z</updated>
<author>
<name>Maulik Shah</name>
<email>mkshah@codeaurora.org</email>
</author>
<published>2021-10-20T08:49:13Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=62563bd99c7d7be269982b88173ad8938420d648'/>
<id>urn:sha1:62563bd99c7d7be269982b88173ad8938420d648</id>
<content type='text'>
Client votes starts at 0x20 offset. Correct the offset.

Reported-and-suggested-by: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Fixes: 1d7724690344 ("soc: qcom: Add Sleep stats driver")
Signed-off-by: Maulik Shah &lt;mkshah@codeaurora.org&gt;
Reviewed-by: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/1634719753-26064-1-git-send-email-mkshah@codeaurora.org
</content>
</entry>
<entry>
<title>soc: qcom: Add Sleep stats driver</title>
<updated>2021-10-16T23:23:30Z</updated>
<author>
<name>Mahesh Sivasubramanian</name>
<email>msivasub@codeaurora.org</email>
</author>
<published>2021-10-13T06:38:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1d7724690344a264f8a567c9214aa65456d7566d'/>
<id>urn:sha1:1d7724690344a264f8a567c9214aa65456d7566d</id>
<content type='text'>
Let's add a driver to read the stats from remote processor and
export to debugfs.

The driver creates "qcom_sleep_stats" directory in debugfs and
adds files for various low power mode available. Below is sample
output with command

cat /sys/kernel/debug/qcom_sleep_stats/ddr
count = 0
Last Entered At = 0
Last Exited At = 0
Accumulated Duration = 0

Signed-off-by: Mahesh Sivasubramanian &lt;msivasub@codeaurora.org&gt;
Signed-off-by: Lina Iyer &lt;ilina@codeaurora.org&gt;
[mkshah: add subsystem sleep stats, create one file for each stat]
Signed-off-by: Maulik Shah &lt;mkshah@codeaurora.org&gt;
Tested-by: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/1634107104-22197-3-git-send-email-mkshah@codeaurora.org
</content>
</entry>
</feed>
