提交 aacfbe6a 编写于 作者: G Guenter Roeck 提交者: Linus Torvalds

kernel/watchdog: move NMI function header declarations from watchdog.h to nmi.h

The kernel's NMI watchdog has nothing to do with the watchdog subsystem.
Its header declarations should be in linux/nmi.h, not linux/watchdog.h.

The code provided two sets of dummy functions if HARDLOCKUP_DETECTOR is
not configured, one in the include file and one in kernel/watchdog.c.
Remove the dummy functions from kernel/watchdog.c and use those from the
include file.
Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
Cc: Stephane Eranian <eranian@google.com>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Don Zickus <dzickus@redhat.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 314b08ff
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/export.h> #include <linux/export.h>
#include <linux/watchdog.h> #include <linux/nmi.h>
#include <asm/cpufeature.h> #include <asm/cpufeature.h>
#include <asm/hardirq.h> #include <asm/hardirq.h>
......
...@@ -26,10 +26,12 @@ static inline void touch_nmi_watchdog(void) ...@@ -26,10 +26,12 @@ static inline void touch_nmi_watchdog(void)
#if defined(CONFIG_HARDLOCKUP_DETECTOR) #if defined(CONFIG_HARDLOCKUP_DETECTOR)
extern void hardlockup_detector_disable(void); extern void hardlockup_detector_disable(void);
void watchdog_nmi_disable_all(void);
void watchdog_nmi_enable_all(void);
#else #else
static inline void hardlockup_detector_disable(void) static inline void hardlockup_detector_disable(void) {}
{ static inline void watchdog_nmi_disable_all(void) {}
} static inline void watchdog_nmi_enable_all(void) {}
#endif #endif
/* /*
......
...@@ -140,12 +140,4 @@ extern int watchdog_init_timeout(struct watchdog_device *wdd, ...@@ -140,12 +140,4 @@ extern int watchdog_init_timeout(struct watchdog_device *wdd,
extern int watchdog_register_device(struct watchdog_device *); extern int watchdog_register_device(struct watchdog_device *);
extern void watchdog_unregister_device(struct watchdog_device *); extern void watchdog_unregister_device(struct watchdog_device *);
#ifdef CONFIG_HARDLOCKUP_DETECTOR
void watchdog_nmi_disable_all(void);
void watchdog_nmi_enable_all(void);
#else
static inline void watchdog_nmi_disable_all(void) {}
static inline void watchdog_nmi_enable_all(void) {}
#endif
#endif /* ifndef _LINUX_WATCHDOG_H */ #endif /* ifndef _LINUX_WATCHDOG_H */
...@@ -651,8 +651,6 @@ void watchdog_nmi_disable_all(void) ...@@ -651,8 +651,6 @@ void watchdog_nmi_disable_all(void)
#else #else
static int watchdog_nmi_enable(unsigned int cpu) { return 0; } static int watchdog_nmi_enable(unsigned int cpu) { return 0; }
static void watchdog_nmi_disable(unsigned int cpu) { return; } static void watchdog_nmi_disable(unsigned int cpu) { return; }
void watchdog_nmi_enable_all(void) {}
void watchdog_nmi_disable_all(void) {}
#endif /* CONFIG_HARDLOCKUP_DETECTOR */ #endif /* CONFIG_HARDLOCKUP_DETECTOR */
static struct smp_hotplug_thread watchdog_threads = { static struct smp_hotplug_thread watchdog_threads = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册