Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163328
b: refs/heads/master
c: 9f14b84
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mundt committed Jul 11, 2009
1 parent 40cb034 commit 32dc5e4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 31 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 473d1cf4ee623b043790838bcf77e77958840bf2
refs/heads/master: 9f14b84afda297d301b81a5bcbd65e83d7b02034
17 changes: 4 additions & 13 deletions trunk/arch/sh/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@ config EARLY_PRINTK
select both the EARLY_SCIF_CONSOLE and SH_STANDARD_BIOS, using
the kernel command line option to toggle back and forth.

config DEBUG_STACKOVERFLOW
config STACK_DEBUG
bool "Check for stack overflows"
depends on DEBUG_KERNEL && SUPERH32
help
This option will cause messages to be printed if free stack space
drops below a certain limit.
drops below a certain limit. Saying Y here will add overhead to
every function call and will therefore incur a major
performance hit. Most users should say N.

config DEBUG_STACK_USAGE
bool "Stack utilization instrumentation"
Expand Down Expand Up @@ -123,17 +125,6 @@ config SH64_SR_WATCH
bool "Debug: set SR.WATCH to enable hardware watchpoints and trace"
depends on SUPERH64

config STACK_DEBUG
bool "Enable diagnostic checks of the kernel stack"
depends on FUNCTION_TRACER
select DEBUG_STACKOVERFLOW
default n
help
This option allows checks to be performed on the kernel stack
at runtime. Saying Y here will add overhead to every function
call and will therefore incur a major performance hit. Most
users should say N.

config MCOUNT
def_bool y
depends on SUPERH32
Expand Down
17 changes: 0 additions & 17 deletions trunk/arch/sh/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,23 +114,6 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
#endif

irq_enter();

#ifdef CONFIG_DEBUG_STACKOVERFLOW
/* Debugging check for stack overflow: is there less than 1KB free? */
{
long sp;

__asm__ __volatile__ ("and r15, %0" :
"=r" (sp) : "0" (THREAD_SIZE - 1));

if (unlikely(sp < (sizeof(struct thread_info) + STACK_WARN))) {
printk("do_IRQ: stack overflow: %ld\n",
sp - sizeof(struct thread_info));
dump_stack();
}
}
#endif

irq = irq_demux(intc_evt2irq(irq));

#ifdef CONFIG_IRQSTACKS
Expand Down

0 comments on commit 32dc5e4

Please sign in to comment.