diff options
author | Cong Wang <xiyou.wangcong@gmail.com> | 2012-03-23 18:01:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 19:58:31 -0400 |
commit | d314d74c695f967e10598467a326f41c78ed1e20 (patch) | |
tree | 71fabe9cf1f2b99f16f7f9cc3f809955038a2d0c | |
parent | b502bd1152472dc1b98c60434f23c23b280c7b94 (diff) |
nmi watchdog: do not use cpp symbol in Kconfig
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>
-rw-r--r-- | arch/Kconfig | 3 | ||||
-rw-r--r-- | arch/blackfin/Kconfig | 1 | ||||
-rw-r--r-- | arch/blackfin/include/asm/irq.h | 4 | ||||
-rw-r--r-- | arch/mn10300/Kconfig | 1 | ||||
-rw-r--r-- | arch/mn10300/include/asm/reset-regs.h | 4 | ||||
-rw-r--r-- | arch/sparc/Kconfig | 1 | ||||
-rw-r--r-- | arch/sparc/include/asm/irq_64.h | 1 | ||||
-rw-r--r-- | include/linux/nmi.h | 2 | ||||
-rw-r--r-- | lib/Kconfig.debug | 2 |
9 files changed, 8 insertions, 11 deletions
diff --git a/arch/Kconfig b/arch/Kconfig index 5b448a74d0f7..a6f14f622d13 100644 --- a/arch/Kconfig +++ b/arch/Kconfig | |||
@@ -120,6 +120,9 @@ config HAVE_KRETPROBES | |||
120 | 120 | ||
121 | config HAVE_OPTPROBES | 121 | config HAVE_OPTPROBES |
122 | bool | 122 | bool |
123 | |||
124 | config HAVE_NMI_WATCHDOG | ||
125 | bool | ||
123 | # | 126 | # |
124 | # An arch should select this if it provides all these things: | 127 | # An arch should select this if it provides all these things: |
125 | # | 128 | # |
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index abe5a9e85148..c1269a1085e1 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig | |||
@@ -36,6 +36,7 @@ config BLACKFIN | |||
36 | select GENERIC_ATOMIC64 | 36 | select GENERIC_ATOMIC64 |
37 | select GENERIC_IRQ_PROBE | 37 | select GENERIC_IRQ_PROBE |
38 | select IRQ_PER_CPU if SMP | 38 | select IRQ_PER_CPU if SMP |
39 | select HAVE_NMI_WATCHDOG if NMI_WATCHDOG | ||
39 | 40 | ||
40 | config GENERIC_CSUM | 41 | config GENERIC_CSUM |
41 | def_bool y | 42 | def_bool y |
diff --git a/arch/blackfin/include/asm/irq.h b/arch/blackfin/include/asm/irq.h index 12f4060a31b0..89de539ed010 100644 --- a/arch/blackfin/include/asm/irq.h +++ b/arch/blackfin/include/asm/irq.h | |||
@@ -38,8 +38,4 @@ | |||
38 | 38 | ||
39 | #include <asm-generic/irq.h> | 39 | #include <asm-generic/irq.h> |
40 | 40 | ||
41 | #ifdef CONFIG_NMI_WATCHDOG | ||
42 | # define ARCH_HAS_NMI_WATCHDOG | ||
43 | #endif | ||
44 | |||
45 | #endif /* _BFIN_IRQ_H_ */ | 41 | #endif /* _BFIN_IRQ_H_ */ |
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig index 8f1c40d5817e..3aa3de017159 100644 --- a/arch/mn10300/Kconfig +++ b/arch/mn10300/Kconfig | |||
@@ -5,6 +5,7 @@ config MN10300 | |||
5 | select GENERIC_IRQ_SHOW | 5 | select GENERIC_IRQ_SHOW |
6 | select HAVE_ARCH_TRACEHOOK | 6 | select HAVE_ARCH_TRACEHOOK |
7 | select HAVE_ARCH_KGDB | 7 | select HAVE_ARCH_KGDB |
8 | select HAVE_NMI_WATCHDOG if MN10300_WD_TIMER | ||
8 | 9 | ||
9 | config AM33_2 | 10 | config AM33_2 |
10 | def_bool n | 11 | def_bool n |
diff --git a/arch/mn10300/include/asm/reset-regs.h b/arch/mn10300/include/asm/reset-regs.h index 10c7502a113f..8ca2a42d365b 100644 --- a/arch/mn10300/include/asm/reset-regs.h +++ b/arch/mn10300/include/asm/reset-regs.h | |||
@@ -17,10 +17,6 @@ | |||
17 | 17 | ||
18 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
19 | 19 | ||
20 | #ifdef CONFIG_MN10300_WD_TIMER | ||
21 | #define ARCH_HAS_NMI_WATCHDOG /* See include/linux/nmi.h */ | ||
22 | #endif | ||
23 | |||
24 | /* | 20 | /* |
25 | * watchdog timer registers | 21 | * watchdog timer registers |
26 | */ | 22 | */ |
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index ca5580e4d813..1666de84d477 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -29,6 +29,7 @@ config SPARC | |||
29 | select GENERIC_IRQ_SHOW | 29 | select GENERIC_IRQ_SHOW |
30 | select USE_GENERIC_SMP_HELPERS if SMP | 30 | select USE_GENERIC_SMP_HELPERS if SMP |
31 | select GENERIC_PCI_IOMAP | 31 | select GENERIC_PCI_IOMAP |
32 | select HAVE_NMI_WATCHDOG if SPARC64 | ||
32 | 33 | ||
33 | config SPARC32 | 34 | config SPARC32 |
34 | def_bool !64BIT | 35 | def_bool !64BIT |
diff --git a/arch/sparc/include/asm/irq_64.h b/arch/sparc/include/asm/irq_64.h index 16dcae6d56e7..abf6afe82ca8 100644 --- a/arch/sparc/include/asm/irq_64.h +++ b/arch/sparc/include/asm/irq_64.h | |||
@@ -95,7 +95,6 @@ void arch_trigger_all_cpu_backtrace(void); | |||
95 | extern void *hardirq_stack[NR_CPUS]; | 95 | extern void *hardirq_stack[NR_CPUS]; |
96 | extern void *softirq_stack[NR_CPUS]; | 96 | extern void *softirq_stack[NR_CPUS]; |
97 | #define __ARCH_HAS_DO_SOFTIRQ | 97 | #define __ARCH_HAS_DO_SOFTIRQ |
98 | #define ARCH_HAS_NMI_WATCHDOG | ||
99 | 98 | ||
100 | #define NO_IRQ 0xffffffff | 99 | #define NO_IRQ 0xffffffff |
101 | 100 | ||
diff --git a/include/linux/nmi.h b/include/linux/nmi.h index 2d304efc89df..db50840e6355 100644 --- a/include/linux/nmi.h +++ b/include/linux/nmi.h | |||
@@ -14,7 +14,7 @@ | |||
14 | * may be used to reset the timeout - for code which intentionally | 14 | * may be used to reset the timeout - for code which intentionally |
15 | * disables interrupts for a long time. This call is stateless. | 15 | * disables interrupts for a long time. This call is stateless. |
16 | */ | 16 | */ |
17 | #if defined(ARCH_HAS_NMI_WATCHDOG) || defined(CONFIG_HARDLOCKUP_DETECTOR) | 17 | #if defined(CONFIG_HAVE_NMI_WATCHDOG) || defined(CONFIG_HARDLOCKUP_DETECTOR) |
18 | #include <asm/nmi.h> | 18 | #include <asm/nmi.h> |
19 | extern void touch_nmi_watchdog(void); | 19 | extern void touch_nmi_watchdog(void); |
20 | #else | 20 | #else |
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 05037dc9bde7..391003f7ab46 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -184,7 +184,7 @@ config LOCKUP_DETECTOR | |||
184 | 184 | ||
185 | config HARDLOCKUP_DETECTOR | 185 | config HARDLOCKUP_DETECTOR |
186 | def_bool LOCKUP_DETECTOR && PERF_EVENTS && HAVE_PERF_EVENTS_NMI && \ | 186 | def_bool LOCKUP_DETECTOR && PERF_EVENTS && HAVE_PERF_EVENTS_NMI && \ |
187 | !ARCH_HAS_NMI_WATCHDOG | 187 | !HAVE_NMI_WATCHDOG |
188 | 188 | ||
189 | config BOOTPARAM_HARDLOCKUP_PANIC | 189 | config BOOTPARAM_HARDLOCKUP_PANIC |
190 | bool "Panic (Reboot) On Hard Lockups" | 190 | bool "Panic (Reboot) On Hard Lockups" |