aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sh/Kconfig.debug17
-rw-r--r--arch/sh/kernel/irq.c17
2 files changed, 4 insertions, 30 deletions
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug
index 75b5f4e06670..b440fd936714 100644
--- a/arch/sh/Kconfig.debug
+++ b/arch/sh/Kconfig.debug
@@ -61,12 +61,14 @@ config EARLY_PRINTK
61 select both the EARLY_SCIF_CONSOLE and SH_STANDARD_BIOS, using 61 select both the EARLY_SCIF_CONSOLE and SH_STANDARD_BIOS, using
62 the kernel command line option to toggle back and forth. 62 the kernel command line option to toggle back and forth.
63 63
64config DEBUG_STACKOVERFLOW 64config STACK_DEBUG
65 bool "Check for stack overflows" 65 bool "Check for stack overflows"
66 depends on DEBUG_KERNEL && SUPERH32 66 depends on DEBUG_KERNEL && SUPERH32
67 help 67 help
68 This option will cause messages to be printed if free stack space 68 This option will cause messages to be printed if free stack space
69 drops below a certain limit. 69 drops below a certain limit. Saying Y here will add overhead to
70 every function call and will therefore incur a major
71 performance hit. Most users should say N.
70 72
71config DEBUG_STACK_USAGE 73config DEBUG_STACK_USAGE
72 bool "Stack utilization instrumentation" 74 bool "Stack utilization instrumentation"
@@ -123,17 +125,6 @@ config SH64_SR_WATCH
123 bool "Debug: set SR.WATCH to enable hardware watchpoints and trace" 125 bool "Debug: set SR.WATCH to enable hardware watchpoints and trace"
124 depends on SUPERH64 126 depends on SUPERH64
125 127
126config STACK_DEBUG
127 bool "Enable diagnostic checks of the kernel stack"
128 depends on FUNCTION_TRACER
129 select DEBUG_STACKOVERFLOW
130 default n
131 help
132 This option allows checks to be performed on the kernel stack
133 at runtime. Saying Y here will add overhead to every function
134 call and will therefore incur a major performance hit. Most
135 users should say N.
136
137config MCOUNT 128config MCOUNT
138 def_bool y 129 def_bool y
139 depends on SUPERH32 130 depends on SUPERH32
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c
index 3d09062f4682..278c68c60488 100644
--- a/arch/sh/kernel/irq.c
+++ b/arch/sh/kernel/irq.c
@@ -114,23 +114,6 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
114#endif 114#endif
115 115
116 irq_enter(); 116 irq_enter();
117
118#ifdef CONFIG_DEBUG_STACKOVERFLOW
119 /* Debugging check for stack overflow: is there less than 1KB free? */
120 {
121 long sp;
122
123 __asm__ __volatile__ ("and r15, %0" :
124 "=r" (sp) : "0" (THREAD_SIZE - 1));
125
126 if (unlikely(sp < (sizeof(struct thread_info) + STACK_WARN))) {
127 printk("do_IRQ: stack overflow: %ld\n",
128 sp - sizeof(struct thread_info));
129 dump_stack();
130 }
131 }
132#endif
133
134 irq = irq_demux(intc_evt2irq(irq)); 117 irq = irq_demux(intc_evt2irq(irq));
135 118
136#ifdef CONFIG_IRQSTACKS 119#ifdef CONFIG_IRQSTACKS