Hello Alexandre, Hello Sascha, On 21.09.22 15:35, Sascha Hauer wrote: > On Wed, Sep 21, 2022 at 04:22:09PM +0200, Alexandre Belloni wrote: >> Hi, >> >> On 21/09/2022 15:17:53+0200, Sascha Hauer wrote: >>> Hi Alexandre, >>> >>> Any input to this series? >> >> I'm not convinced this is necessary. Having an invalid alarm doesn't >> mean that the time is invalid and that check will only ever happen at >> boot time whereas V2F is a reliable indication that the time is invalid. >> >> Have you really had an RTC with an invalid time that is not caught by >> rtc_valid_tm and with V2F not set? > > I don't know. I must talk to Ahmad in this regard, he'll be back next > week. It could be that we only created this patch to be sure the RTC > state is sane. The kernel message rtc rtc0: invalid alarm value: 2020-3-27 7:82:0 listed in the commit message is something I actually ran into. There was no v2f set then. The customer has also variously observed bit flips independently of v2f: During EMC testing, electrostatic discharge at developer desks and even in the field: Suspected causes were lightning strikes in the vicinity and the switching of larger inductive loads. They're very paranoid of logging invalid timestamps, so we'll keep the patch anyhow at our side, but I think it is generally useful as well: If we can't set an invalid alarm time by normal means, but read back an invalid time, something may have corrupted other memory, so treating it as a v2f is sensible. Thanks, Ahmad > > Sascha > > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |