Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'timers-urgent-2021-05-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fixes from Thomas Gleixner:
"Two fixes for timers:

- Use the ALARM feature check in the alarmtimer core code insted of
the old method of checking for the set_alarm() callback.

Drivers can have that callback set but the feature bit cleared. If
such a RTC device is selected then alarms wont work.

- Use a proper define to let the preprocessor check whether Hyper-V
VDSO clocksource should be active.

The code used a constant in an enum with #ifdef, which evaluates to
always false and disabled the clocksource for VDSO"

* tag 'timers-urgent-2021-05-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
clocksource/drivers/hyper-v: Re-enable VDSO_CLOCKMODE_HVCLOCK on X86
alarmtimer: Check RTC features instead of ops

+5 -3
+2
arch/x86/include/asm/vdso/clocksource.h
··· 7 7 VDSO_CLOCKMODE_PVCLOCK, \ 8 8 VDSO_CLOCKMODE_HVCLOCK 9 9 10 + #define HAVE_VDSO_CLOCKMODE_HVCLOCK 11 + 10 12 #endif /* __ASM_VDSO_CLOCKSOURCE_H */
+2 -2
drivers/clocksource/hyperv_timer.c
··· 419 419 hv_set_register(HV_REGISTER_REFERENCE_TSC, tsc_msr); 420 420 } 421 421 422 - #ifdef VDSO_CLOCKMODE_HVCLOCK 422 + #ifdef HAVE_VDSO_CLOCKMODE_HVCLOCK 423 423 static int hv_cs_enable(struct clocksource *cs) 424 424 { 425 425 vclocks_set_used(VDSO_CLOCKMODE_HVCLOCK); ··· 435 435 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 436 436 .suspend= suspend_hv_clock_tsc, 437 437 .resume = resume_hv_clock_tsc, 438 - #ifdef VDSO_CLOCKMODE_HVCLOCK 438 + #ifdef HAVE_VDSO_CLOCKMODE_HVCLOCK 439 439 .enable = hv_cs_enable, 440 440 .vdso_clock_mode = VDSO_CLOCKMODE_HVCLOCK, 441 441 #else
+1 -1
kernel/time/alarmtimer.c
··· 92 92 if (rtcdev) 93 93 return -EBUSY; 94 94 95 - if (!rtc->ops->set_alarm) 95 + if (!test_bit(RTC_FEATURE_ALARM, rtc->features)) 96 96 return -1; 97 97 if (!device_may_wakeup(rtc->dev.parent)) 98 98 return -1;