Skip to content

PM / Suspend: Print wall time

Mark Salyzyn linux-pm linux-rtc lkml 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 of 4 patches 11 repliesIn review
  2. v14 patches 8 repliesSuperseded

Changes in v2 from the cover letter

- move implementation to kernel timekeeping from rtc_lib files
- use rtc_time64_to_tm() instead of rtc_time_to_tm()
- use inline in include/linux/rtc.h for !CONFIG_RTC_SHOW_TIME
- use late_initcall to ensure rtc_lib driver(s) are loaded

2 of 4 patches are in this archive. The cover letter announces 4.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4time: rtc-lib: Add rtc_show_time(const char *prefix_msg)include/linux/rtc.h kernel/time/Kconfig kernel/time/Makefile +1 more+40 -010 replies
2/4time: Print wall time at die and rebootkernel/time/rtc_show_time.c+59 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/4] PM / Suspend: Print wall time

Helpful for post-mortem analysis to synchronize CLOCK_MONOTONIC kernel logs with CLOCK_REALTIME user space logs. Post-mortem analysis for Battery and Power diagnosis. Improved reporting of suspension times against the rtc wallclock, which is persistent even at the lowest power management states.

analyze_suspend.py requires a configured kernel to debug, these prints can remain in a field product with CONFIG_RTC_TIME_SHOW.

v2:
- move implementation to kernel timekeeping from rtc_lib files
- use rtc_time64_to_tm() instead of rtc_time_to_tm()
- use inline in include/linux/rtc.h for !CONFIG_RTC_SHOW_TIME
- use late_initcall to ensure rtc_lib driver(s) are loaded

---
 include/linux/rtc.h         |    5 ++
 kernel/power/hibernate.c    |    4 +-
 kernel/power/suspend.c      |    3 +
 kernel/time/Kconfig         |   11 +++++
 kernel/time/Makefile        |    1 
 kernel/time/rtc_show_time.c |   82 ++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 105 insertions(+), 1 deletion(-)