[PATCH v4 0/4] Extend time to wait for UIP for some callers

Mario Limonciello posted 4 patches 2 years ago
arch/alpha/kernel/rtc.c        |  2 +-
arch/x86/kernel/hpet.c         |  2 +-
arch/x86/kernel/rtc.c          |  2 +-
drivers/base/power/trace.c     |  2 +-
drivers/rtc/rtc-cmos.c         | 10 ++++-----
drivers/rtc/rtc-mc146818-lib.c | 39 ++++++++++++++++++++++++++--------
include/linux/mc146818rtc.h    |  3 ++-
7 files changed, 41 insertions(+), 19 deletions(-)
[PATCH v4 0/4] Extend time to wait for UIP for some callers
Posted by Mario Limonciello 2 years ago
A number of users have reported their system will have a failure reading
the RTC around s2idle entry or exit.

This failure manifests as UIP clear taking longer than 10ms.

By a debugging patch provided by Mateusz Jończyk it is shown that this
has taken upwards of 300ms in some cases.

This series adjusts the UIP timeout to be configurable by the caller and
changes some callers which aren't called in an interrupt context to allow
longer timeouts.

Mario Limonciello (4):
  rtc: mc146818-lib: Adjust failure return code for mc146818_get_time()
  rtc: Adjust failure return code for cmos_set_alarm()
  rtc: Add support for configuring the UIP timeout for RTC reads
  rtc: Extend timeout for waiting for UIP to clear to 1s

 arch/alpha/kernel/rtc.c        |  2 +-
 arch/x86/kernel/hpet.c         |  2 +-
 arch/x86/kernel/rtc.c          |  2 +-
 drivers/base/power/trace.c     |  2 +-
 drivers/rtc/rtc-cmos.c         | 10 ++++-----
 drivers/rtc/rtc-mc146818-lib.c | 39 ++++++++++++++++++++++++++--------
 include/linux/mc146818rtc.h    |  3 ++-
 7 files changed, 41 insertions(+), 19 deletions(-)


base-commit: 2cc14f52aeb78ce3f29677c2de1f06c0e91471ab
-- 
2.34.1

Re: [PATCH v4 0/4] Extend time to wait for UIP for some callers
Posted by Alexandre Belloni 1 year, 12 months ago
On Mon, 27 Nov 2023 23:36:49 -0600, Mario Limonciello wrote:
> A number of users have reported their system will have a failure reading
> the RTC around s2idle entry or exit.
> 
> This failure manifests as UIP clear taking longer than 10ms.
> 
> By a debugging patch provided by Mateusz Jończyk it is shown that this
> has taken upwards of 300ms in some cases.
> 
> [...]

Applied, thanks!

[1/4] rtc: mc146818-lib: Adjust failure return code for mc146818_get_time()
      commit: af838635a3eb9b1bc0d98599c101ebca98f31311
[2/4] rtc: Adjust failure return code for cmos_set_alarm()
      commit: 1311a8f0d4b23f58bbababa13623aa40b8ad4e0c
[3/4] rtc: Add support for configuring the UIP timeout for RTC reads
      commit: 120931db07b49252aba2073096b595482d71857c
[4/4] rtc: Extend timeout for waiting for UIP to clear to 1s
      commit: cef9ecc8e938dd48a560f7dd9be1246359248d20


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com