kernel/watchdog: introduce arch_touch_nmi_watchdog()

For architectures that define HAVE_NMI_WATCHDOG, instead of having them
provide the complete touch_nmi_watchdog() function, just have them
provide arch_touch_nmi_watchdog().

This gives the generic code more flexibility in implementing this
function, and arch implementations don't miss out on touching the
softlockup watchdog or other generic details.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Nicholas Piggin <[email protected]>
Reviewed-by: Don Zickus <[email protected]>
Reviewed-by: Babu Moger <[email protected]>
Tested-by: Babu Moger <[email protected]>	[sparc]
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Michael Ellerman <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Nicholas Piggin 2017-07-12 14:35:43 -07:00 • committed by Linus Torvalds
commit f2e0cff85e
9 changed files with 31 additions and 24 deletions

View file

@ -9,4 +9,6 @@
#include <linux/nmi.h>
extern void arch_touch_nmi_watchdog(void);
#endif

View file

@ -190,7 +190,7 @@ static int __init init_nmi_wdt(void)
}
device_initcall(init_nmi_wdt);
void touch_nmi_watchdog(void)
void arch_touch_nmi_watchdog(void)
{
atomic_set(&nmi_touched[smp_processor_id()], 1);
}