Hello, This patch series fixes some issues in the RTC CMOS handling code: 1. A missing spin_lock_irq() / spin_unlock_irq() pair in cmos_set_alarm(). 2. A failing presence check of the RTC: the clock was misdetected as broken since Linux 5.11 on one of our home systems. 3. Do not touch the RTC alarm registers when the RTC update is in progress. (On some Intel chipsets, this causes bogus values being read or writes to fail silently.) This is my first patch series, so please review carefully. v2: Drop the last patch: Revert "rtc: cmos: Replace spin_lock_irqsave with spin_lock in hard IRQ" which was made obsolete by mainlining of commit 13be2efc390a ("rtc: cmos: Disable irq around direct invocation of cmos_interrupt()") v3: Rework solution to problem 3 (I'd like to thank Greg KH for comment), drop x86 refactoring patches (I'll send them later). Greetings, Mateusz Signed-off-by: Mateusz Jończyk <mat.jonczyk@xxxxx> Cc: Alessandro Zummo <a.zummo@xxxxxxxxxxxx> Cc: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx> Cc: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>