diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2019-07-26 14:30:54 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2019-08-01 14:51:20 -0400 |
commit | d2ab4cf4943576fb060b8a69341d9e0c2a952ba7 (patch) | |
tree | d3b61f7a0313b00bed39899688ad3d5ccf9690c8 | |
parent | 30f9028b6c43fd17c006550594ea3dbb87afbf80 (diff) |
watchdog: Mark watchdog_hrtimer to expire in hard interrupt context
The watchdog hrtimer must expire in hard interrupt context even on
PREEMPT_RT=y kernels as otherwise the hard/softlockup detection logic would
not work.
No functional change.
[ tglx: Split out from larger combo patch. Added changelog ]
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20190726185753.262895510@linutronix.de
-rw-r--r-- | kernel/watchdog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 7f9e7b9306fe..f41334ef0971 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c | |||
@@ -490,10 +490,10 @@ static void watchdog_enable(unsigned int cpu) | |||
490 | * Start the timer first to prevent the NMI watchdog triggering | 490 | * Start the timer first to prevent the NMI watchdog triggering |
491 | * before the timer has a chance to fire. | 491 | * before the timer has a chance to fire. |
492 | */ | 492 | */ |
493 | hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); | 493 | hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD); |
494 | hrtimer->function = watchdog_timer_fn; | 494 | hrtimer->function = watchdog_timer_fn; |
495 | hrtimer_start(hrtimer, ns_to_ktime(sample_period), | 495 | hrtimer_start(hrtimer, ns_to_ktime(sample_period), |
496 | HRTIMER_MODE_REL_PINNED); | 496 | HRTIMER_MODE_REL_PINNED_HARD); |
497 | 497 | ||
498 | /* Initialize timestamp */ | 498 | /* Initialize timestamp */ |
499 | __touch_watchdog(); | 499 | __touch_watchdog(); |