diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2021-07-13 15:39:48 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2021-08-10 17:57:22 +0200 |
commit | 8c3b5e6ec0fee18bc2ce38d1dfe913413205f908 (patch) | |
tree | 6318bc9ca46901239a6818d50f78e189543e70e7 /kernel/time/hrtimer.c | |
parent | b14bca97c9f5c3e3f133445b01c723e95490d843 (diff) |
hrtimer: Ensure timerfd notification for HIGHRES=n
If high resolution timers are disabled the timerfd notification about a
clock was set event is not happening for all cases which use
clock_was_set_delayed() because that's a NOP for HIGHRES=n, which is wrong.
Make clock_was_set_delayed() unconditially available to fix that.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20210713135158.196661266@linutronix.de
Diffstat (limited to 'kernel/time/hrtimer.c')
-rw-r--r-- | kernel/time/hrtimer.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 5f7c46598d9f..7ebf642b53f9 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -777,22 +777,6 @@ static void hrtimer_switch_to_hres(void) retrigger_next_event(NULL); } -static void clock_was_set_work(struct work_struct *work) -{ - clock_was_set(); -} - -static DECLARE_WORK(hrtimer_work, clock_was_set_work); - -/* - * Called from timekeeping and resume code to reprogram the hrtimer - * interrupt device on all cpus. - */ -void clock_was_set_delayed(void) -{ - schedule_work(&hrtimer_work); -} - #else static inline int hrtimer_is_hres_enabled(void) { return 0; } @@ -877,6 +861,22 @@ void clock_was_set(void) timerfd_clock_was_set(); } +static void clock_was_set_work(struct work_struct *work) +{ + clock_was_set(); +} + +static DECLARE_WORK(hrtimer_work, clock_was_set_work); + +/* + * Called from timekeeping and resume code to reprogram the hrtimer + * interrupt device on all cpus and to notify timerfd. + */ +void clock_was_set_delayed(void) +{ + schedule_work(&hrtimer_work); +} + /* * During resume we might have to reprogram the high resolution timer * interrupt on all online CPUs. However, all other CPUs will be |