Merge tag 'timers_urgent_for_v5.11_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fixes from Borislav Petkov:
"Two more timers-related fixes for v5.11:

- Use a freezable workqueue for RTC sync because the sync can happen
at any time and trigger suspend assertion checks in the i2c
subsystem.

- Correct a previous RTC validation change to check only bit 6 in
register D because some Intel machines use bits 0-5"

* tag 'timers_urgent_for_v5.11_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
ntp: Use freezable workqueue for RTC synchronization
rtc: mc146818: Dont test for bit 0-5 in Register D

Changed files
+6 -6
drivers
kernel
time
+2 -2
drivers/rtc/rtc-cmos.c
··· 805 805 806 806 spin_lock_irq(&rtc_lock); 807 807 808 - /* Ensure that the RTC is accessible. Bit 0-6 must be 0! */ 809 - if ((CMOS_READ(RTC_VALID) & 0x7f) != 0) { 808 + /* Ensure that the RTC is accessible. Bit 6 must be 0! */ 809 + if ((CMOS_READ(RTC_VALID) & 0x40) != 0) { 810 810 spin_unlock_irq(&rtc_lock); 811 811 dev_warn(dev, "not accessible\n"); 812 812 retval = -ENXIO;
+2 -2
drivers/rtc/rtc-mc146818-lib.c
··· 21 21 22 22 again: 23 23 spin_lock_irqsave(&rtc_lock, flags); 24 - /* Ensure that the RTC is accessible. Bit 0-6 must be 0! */ 25 - if (WARN_ON_ONCE((CMOS_READ(RTC_VALID) & 0x7f) != 0)) { 24 + /* Ensure that the RTC is accessible. Bit 6 must be 0! */ 25 + if (WARN_ON_ONCE((CMOS_READ(RTC_VALID) & 0x40) != 0)) { 26 26 spin_unlock_irqrestore(&rtc_lock, flags); 27 27 memset(time, 0xff, sizeof(*time)); 28 28 return 0;
+2 -2
kernel/time/ntp.c
··· 502 502 503 503 static enum hrtimer_restart sync_timer_callback(struct hrtimer *timer) 504 504 { 505 - queue_work(system_power_efficient_wq, &sync_work); 505 + queue_work(system_freezable_power_efficient_wq, &sync_work); 506 506 507 507 return HRTIMER_NORESTART; 508 508 } ··· 668 668 * just a pointless work scheduled. 669 669 */ 670 670 if (ntp_synced() && !hrtimer_is_queued(&sync_hrtimer)) 671 - queue_work(system_power_efficient_wq, &sync_work); 671 + queue_work(system_freezable_power_efficient_wq, &sync_work); 672 672 } 673 673 674 674 static void __init ntp_init_cmos_sync(void)