Fwd: Read from RTC broken upon resume from suspend on HP Pro x360 435 G9 w/ AMD Ryzen 7 5825U

From: Bagas Sanjaya
Date: Mon Jul 03 2023 - 09:26:00 EST


Hi,

I notice a regression report on Bugzilla [1]. Quoting from it:

> Dear all,
>
> read access to the device's RTC fails upon resume from suspend with the following error message grabbed from the kernel ring buffer:
>
> [409610.163139] Unable to read current time from RTC
>
> The issue is rare and more likely to appear if the system has been in standby for more than 24hrs w/o interruption.
>
> Same issue is reported to appear on HP Elite G9 devices, cf. https://bbs.archlinux.org/viewtopic.php?id=283620
>
> The issue screws up the systems time resulting in erroneous dated log entries, failing authentication, ..., thus requiring a reboot.
>
> Please see attached dmesg output (line 2069) for further information.
>
> AMD staff member suspected commit d2a632a8a11756197deb1341bbb09c09abaf20ce to cause a race condition, thus being responsible for the issue. They suggested to increase the delays introduced by latter commmit to 300us. Unfortunately this does not resolve the issue.
>
> Any help would be appreciated.

See Bugzilla for the full thread and attached dmesg.

Mateusz: It looks like this regression is caused by a commit of yours.
Would you like to take a look on it?

Anyway, I'm adding it to regzbot:

#regzbot introduced: d2a632a8a11756 https://bugzilla.kernel.org/show_bug.cgi?id=217626
#regzbot title: reducing RTC_UIP polling period causes broken RTC on resume from suspend

Thanks.

[1]: https://bugzilla.kernel.org/show_bug.cgi?id=217626

--
An old man doll... just what I always wanted! - Clara