linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V6 0/3] soc: qcom: boot_stats: Add driver support for boot_stats
@ 2023-05-09 10:52 Souradeep Chowdhury
  2023-05-09 10:52 ` [PATCH V6 1/3] dt-bindings: sram: qcom,imem: Add Boot Stat region within IMEM Souradeep Chowdhury
                   ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Souradeep Chowdhury @ 2023-05-09 10:52 UTC (permalink / raw)
  To: Andy Gross, Konrad Dybcio, Krzysztof Kozlowski, Bjorn Andersson,
	Rob Herring
  Cc: linux-arm-kernel, linux-kernel, linux-arm-msm, devicetree,
	Sibi Sankar, Rajendra Nayak, Souradeep Chowdhury

Qualcomm's proprietary Android boot-loaders capture boot time
stats, like the time when the bootloader started execution and at what
point the bootloader handed over control to the kernel etc. in the IMEM
region. This information is captured in a specific format by this driver
by mapping a structure to the IMEM memory region and then accessing the
members of the structure to log the information in a debugfs file.
This information is useful in verifying if existing boot KPIs have
regressed or not.

A sample log in SM8450(waipio) device is as follows:-

/sys/kernel/debug/qcom_boot_stats # cat abl_time
17898 ms
/sys/kernel/debug/qcom_boot_stats # cat pre_abl_time
2879 ms

The Module Power Manager(MPM) sleep counter starts ticking at the PBL
stage and the timestamp generated by the sleep counter is logged by
the Qualcomm proprietary bootloader(ABL) at two points-> First when it
starts execution which is logged here as "pre_abl_time" and the second
when it is about to load the kernel logged as "abl_time". Both these
values are read up by the driver from IMEM region and printed as above.

Changes in V6

*Implemented the comments on V4 and V5 of the patch

Souradeep Chowdhury (3):
  dt-bindings: sram: qcom,imem: Add Boot Stat region within IMEM
  soc: qcom: boot_stat: Add Driver Support for Boot Stats
  MAINTAINERS: Add the entry for boot_stats driver support

 .../ABI/testing/debugfs-driver-bootstat       |  17 +++
 .../devicetree/bindings/sram/qcom,imem.yaml   |  22 ++++
 MAINTAINERS                                   |   7 ++
 drivers/soc/qcom/Kconfig                      |  10 ++
 drivers/soc/qcom/Makefile                     |   1 +
 drivers/soc/qcom/boot_stats.c                 | 100 ++++++++++++++++++
 6 files changed, 157 insertions(+)
 create mode 100644 Documentation/ABI/testing/debugfs-driver-bootstat
 create mode 100644 drivers/soc/qcom/boot_stats.c

-- 
2.17.1


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2023-05-17  0:09 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-09 10:52 [PATCH V6 0/3] soc: qcom: boot_stats: Add driver support for boot_stats Souradeep Chowdhury
2023-05-09 10:52 ` [PATCH V6 1/3] dt-bindings: sram: qcom,imem: Add Boot Stat region within IMEM Souradeep Chowdhury
2023-05-09 11:35   ` Dmitry Baryshkov
2023-05-09 12:21     ` Souradeep Chowdhury
2023-05-09 13:05       ` Dmitry Baryshkov
2023-05-11  5:59         ` Souradeep Chowdhury
2023-05-16  8:16     ` Arnd Bergmann
2023-05-16 18:34       ` Trilok Soni
2023-05-16 18:41         ` Arnd Bergmann
2023-05-16 19:17       ` Dmitry Baryshkov
2023-05-16 21:58         ` Trilok Soni
2023-05-09 10:52 ` [PATCH V6 2/3] soc: qcom: boot_stat: Add Driver Support for Boot Stats Souradeep Chowdhury
2023-05-09 11:39   ` Dmitry Baryshkov
2023-05-09 12:26     ` Souradeep Chowdhury
2023-05-09 13:01       ` Dmitry Baryshkov
2023-05-11  5:42         ` Souradeep Chowdhury
2023-05-09 14:06   ` kernel test robot
2023-05-10  8:18   ` kernel test robot
2023-05-11 17:07   ` Bjorn Andersson
2023-05-11 17:11     ` Trilok Soni
2023-05-12 11:46     ` Souradeep Chowdhury
2023-05-15  4:31   ` Satya Durga Srinivasu Prabhala
2023-05-16  8:19   ` Arnd Bergmann
2023-05-17  0:09     ` Dmitry Baryshkov
2023-05-09 10:52 ` [PATCH V6 3/3] MAINTAINERS: Add the entry for boot_stats driver support Souradeep Chowdhury

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).