Message ID | 20230504151100.v4.1.I8cbb2f4fa740528fcfade4f5439b6cdcdd059251@changeid (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | watchdog/hardlockup: Add the buddy hardlockup detector | expand |
On Fri May 5, 2023 at 8:13 AM AEST, Douglas Anderson wrote: > The real watchdog_update_hrtimer_threshold() is defined in > watchdog_hardlockup_perf.c. That file is included if In kernel/watchdog_hld.c. > CONFIG_HARDLOCKUP_DETECTOR_PERF and the function is defined in that > file if CONFIG_HARDLOCKUP_CHECK_TIMESTAMP. > > The dummy version of the function in "nmi.h" didn't get that quite > right. While this doesn't appear to be a huge deal, it's nice to make > it consistent. It doesn't break builds because CHECK_TIMESTAMP is only defined by x86 so others don't get a double definition, and x86 uses perf lockup detector, so it gets the out of line version. So has no functional change but should be fixed. Reviewed-by: Nicholas Piggin <npiggin@gmail.com> > > Fixes: 7edaeb6841df ("kernel/watchdog: Prevent false positives with turbo modes") > Signed-off-by: Douglas Anderson <dianders@chromium.org> > --- > > Changes in v4: > - ("Define dummy watchdog_update_hrtimer_threshold() ...") new for v4. > > include/linux/nmi.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/nmi.h b/include/linux/nmi.h > index 048c0b9aa623..771d77b62bc1 100644 > --- a/include/linux/nmi.h > +++ b/include/linux/nmi.h > @@ -197,7 +197,7 @@ u64 hw_nmi_get_sample_period(int watchdog_thresh); > #endif > > #if defined(CONFIG_HARDLOCKUP_CHECK_TIMESTAMP) && \ > - defined(CONFIG_HARDLOCKUP_DETECTOR) > + defined(CONFIG_HARDLOCKUP_DETECTOR_PERF) > void watchdog_update_hrtimer_threshold(u64 period); > #else > static inline void watchdog_update_hrtimer_threshold(u64 period) { } > -- > 2.40.1.521.gf1e218fcd8-goog
diff --git a/include/linux/nmi.h b/include/linux/nmi.h index 048c0b9aa623..771d77b62bc1 100644 --- a/include/linux/nmi.h +++ b/include/linux/nmi.h @@ -197,7 +197,7 @@ u64 hw_nmi_get_sample_period(int watchdog_thresh); #endif #if defined(CONFIG_HARDLOCKUP_CHECK_TIMESTAMP) && \ - defined(CONFIG_HARDLOCKUP_DETECTOR) + defined(CONFIG_HARDLOCKUP_DETECTOR_PERF) void watchdog_update_hrtimer_threshold(u64 period); #else static inline void watchdog_update_hrtimer_threshold(u64 period) { }
The real watchdog_update_hrtimer_threshold() is defined in watchdog_hardlockup_perf.c. That file is included if CONFIG_HARDLOCKUP_DETECTOR_PERF and the function is defined in that file if CONFIG_HARDLOCKUP_CHECK_TIMESTAMP. The dummy version of the function in "nmi.h" didn't get that quite right. While this doesn't appear to be a huge deal, it's nice to make it consistent. Fixes: 7edaeb6841df ("kernel/watchdog: Prevent false positives with turbo modes") Signed-off-by: Douglas Anderson <dianders@chromium.org> --- Changes in v4: - ("Define dummy watchdog_update_hrtimer_threshold() ...") new for v4. include/linux/nmi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)