nmi watchdog: do not use cpp symbol in Kconfig
authorCong Wang <xiyou.wangcong@gmail.com>
Fri, 23 Mar 2012 22:01:51 +0000 (15:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 23 Mar 2012 23:58:31 +0000 (16:58 -0700)
ARCH_HAS_NMI_WATCHDOG is a macro defined by arch, but config
HARDLOCKUP_DETECTOR depends on it.  This is wrong, ARCH_HAS_NMI_WATCHDOG
has to be a Kconfig config, and arch's need it should select it
explicitly.

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Acked-by: Don Zickus <dzickus@redhat.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Cc: David Howells <dhowells@redhat.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/Kconfig
arch/blackfin/Kconfig
arch/blackfin/include/asm/irq.h
arch/mn10300/Kconfig
arch/mn10300/include/asm/reset-regs.h
arch/sparc/Kconfig
arch/sparc/include/asm/irq_64.h
include/linux/nmi.h
lib/Kconfig.debug

index 5b448a74d0f756a41eb275639efef22186f55d66..a6f14f622d1388bee0a6663679762f155991dadc 100644 (file)
@@ -120,6 +120,9 @@ config HAVE_KRETPROBES
 
 config HAVE_OPTPROBES
        bool
+
+config HAVE_NMI_WATCHDOG
+       bool
 #
 # An arch should select this if it provides all these things:
 #
index abe5a9e85148333ec09b1592b27aeb0e35e225fe..c1269a1085e16fa12b7e5377500b7ef4da829a47 100644 (file)
@@ -36,6 +36,7 @@ config BLACKFIN
        select GENERIC_ATOMIC64
        select GENERIC_IRQ_PROBE
        select IRQ_PER_CPU if SMP
+       select HAVE_NMI_WATCHDOG if NMI_WATCHDOG
 
 config GENERIC_CSUM
        def_bool y
index 12f4060a31b034e9cd7190b075da6f58d6d4abaa..89de539ed0100624ead2e5ea6d7f9790eed11cf2 100644 (file)
@@ -38,8 +38,4 @@
 
 #include <asm-generic/irq.h>
 
-#ifdef CONFIG_NMI_WATCHDOG
-# define ARCH_HAS_NMI_WATCHDOG
-#endif
-
 #endif                         /* _BFIN_IRQ_H_ */
index 8f1c40d5817ebb80e9bc818deed5c0b0d80f3ac7..3aa3de017159165c322d7e1e05542228ff06b462 100644 (file)
@@ -5,6 +5,7 @@ config MN10300
        select GENERIC_IRQ_SHOW
        select HAVE_ARCH_TRACEHOOK
        select HAVE_ARCH_KGDB
+       select HAVE_NMI_WATCHDOG if MN10300_WD_TIMER
 
 config AM33_2
        def_bool n
index 10c7502a113fbce1cfeb07b56eec061caa1523c8..8ca2a42d365b43a160e4d1bb8eafee2a44dfbe17 100644 (file)
 
 #ifdef __KERNEL__
 
-#ifdef CONFIG_MN10300_WD_TIMER
-#define ARCH_HAS_NMI_WATCHDOG          /* See include/linux/nmi.h */
-#endif
-
 /*
  * watchdog timer registers
  */
index ca5580e4d813711f272c57ddb6b5f43428ed99f9..1666de84d477e6e72c00689f1011247501e42db1 100644 (file)
@@ -29,6 +29,7 @@ config SPARC
        select GENERIC_IRQ_SHOW
        select USE_GENERIC_SMP_HELPERS if SMP
        select GENERIC_PCI_IOMAP
+       select HAVE_NMI_WATCHDOG if SPARC64
 
 config SPARC32
        def_bool !64BIT
index 16dcae6d56e7a777b1c833bb8f6f16d57279271a..abf6afe82ca89d1728c422e4d220acdf90c596ee 100644 (file)
@@ -95,7 +95,6 @@ void arch_trigger_all_cpu_backtrace(void);
 extern void *hardirq_stack[NR_CPUS];
 extern void *softirq_stack[NR_CPUS];
 #define __ARCH_HAS_DO_SOFTIRQ
-#define ARCH_HAS_NMI_WATCHDOG
 
 #define NO_IRQ         0xffffffff
 
index 2d304efc89dfc442fe76607a940371618d7700f0..db50840e6355ece37b36106cb3a9fa6d3939f8d6 100644 (file)
@@ -14,7 +14,7 @@
  * may be used to reset the timeout - for code which intentionally
  * disables interrupts for a long time. This call is stateless.
  */
-#if defined(ARCH_HAS_NMI_WATCHDOG) || defined(CONFIG_HARDLOCKUP_DETECTOR)
+#if defined(CONFIG_HAVE_NMI_WATCHDOG) || defined(CONFIG_HARDLOCKUP_DETECTOR)
 #include <asm/nmi.h>
 extern void touch_nmi_watchdog(void);
 #else
index 05037dc9bde73b884886b70c3a0251c880395063..391003f7ab46b401cd6d99d518e3c0a493256c22 100644 (file)
@@ -184,7 +184,7 @@ config LOCKUP_DETECTOR
 
 config HARDLOCKUP_DETECTOR
        def_bool LOCKUP_DETECTOR && PERF_EVENTS && HAVE_PERF_EVENTS_NMI && \
-                !ARCH_HAS_NMI_WATCHDOG
+                !HAVE_NMI_WATCHDOG
 
 config BOOTPARAM_HARDLOCKUP_PANIC
        bool "Panic (Reboot) On Hard Lockups"