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/20170616065715.18390-3-npiggin@gmail.com Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Don Zickus <dzickus@redhat.com> Reviewed-by: Babu Moger <babu.moger@oracle.com> Tested-by: Babu Moger <babu.moger@oracle.com> [sparc] Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
24bb44612c
commit
f2e0cff85e
@@ -7,6 +7,7 @@ void nmi_adjust_hz(unsigned int new_hz);
|
||||
|
||||
extern atomic_t nmi_active;
|
||||
|
||||
void arch_touch_nmi_watchdog(void);
|
||||
void start_nmi_watchdog(void *unused);
|
||||
void stop_nmi_watchdog(void *unused);
|
||||
|
||||
|
@@ -51,7 +51,7 @@ static DEFINE_PER_CPU(unsigned int, last_irq_sum);
|
||||
static DEFINE_PER_CPU(long, alert_counter);
|
||||
static DEFINE_PER_CPU(int, nmi_touch);
|
||||
|
||||
void touch_nmi_watchdog(void)
|
||||
void arch_touch_nmi_watchdog(void)
|
||||
{
|
||||
if (atomic_read(&nmi_active)) {
|
||||
int cpu;
|
||||
@@ -61,10 +61,8 @@ void touch_nmi_watchdog(void)
|
||||
per_cpu(nmi_touch, cpu) = 1;
|
||||
}
|
||||
}
|
||||
|
||||
touch_softlockup_watchdog();
|
||||
}
|
||||
EXPORT_SYMBOL(touch_nmi_watchdog);
|
||||
EXPORT_SYMBOL(arch_touch_nmi_watchdog);
|
||||
|
||||
static void die_nmi(const char *str, struct pt_regs *regs, int do_panic)
|
||||
{
|
||||
|
Reference in New Issue
Block a user