]> git.baikalelectronics.ru Git - kernel.git/commitdiff
powerpc/watchdog: Declare soft_nmi_interrupt() prototype
authorCédric Le Goater <clg@kaod.org>
Mon, 4 Jan 2021 14:32:00 +0000 (15:32 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 30 Jan 2021 00:39:30 +0000 (11:39 +1100)
soft_nmi_interrupt() usage requires PPC_WATCHDOG to be configured.
Check the CONFIG definition to declare the prototype.

It fixes this W=1 compile error :

../arch/powerpc/kernel/watchdog.c:250:6: error: no previous prototype for ‘soft_nmi_interrupt’ [-Werror=missing-prototypes]
  250 | void soft_nmi_interrupt(struct pt_regs *regs)
      |      ^~~~~~~~~~~~~~~~~~

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210104143206.695198-18-clg@kaod.org
arch/powerpc/include/asm/nmi.h
arch/powerpc/kernel/watchdog.c

index 84b4cfe73edddec59abd875d6e807dce7c251a2e..63eccea937969045fbca02bcb433d94228ae7a71 100644 (file)
@@ -4,6 +4,7 @@
 
 #ifdef CONFIG_PPC_WATCHDOG
 extern void arch_touch_nmi_watchdog(void);
+void soft_nmi_interrupt(struct pt_regs *regs);
 #else
 static inline void arch_touch_nmi_watchdog(void) {}
 #endif
index af3c15a1d41eb159670be90218c12b9966afa7f1..3ae13c2a10cf4d514f69aa6673d8e4a1c73e1936 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/smp.h>
 
 #include <asm/paca.h>
+#include <asm/nmi.h>
 
 /*
  * The powerpc watchdog ensures that each CPU is able to service timers.