diff options
author | Robin Getz <rgetz@blackfin.uclinux.org> | 2009-01-07 10:14:38 -0500 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2009-01-07 10:14:38 -0500 |
commit | a45d575f53c9ed2926840377e59aa19e2024ee87 (patch) | |
tree | 0789f43eaee963ea5c4f4f011080b4e36a77c7eb /arch/blackfin/kernel | |
parent | f768a0eb90831ced2129df6ccba6f1177fa5a0fa (diff) |
Blackfin arch: Add basic irq stack checking for Blackfin
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/kernel')
-rw-r--r-- | arch/blackfin/kernel/irqchip.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/blackfin/kernel/irqchip.c b/arch/blackfin/kernel/irqchip.c index 5ad07525ea3f..1624e1129681 100644 --- a/arch/blackfin/kernel/irqchip.c +++ b/arch/blackfin/kernel/irqchip.c | |||
@@ -120,7 +120,21 @@ asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs) | |||
120 | desc = &bad_irq_desc; | 120 | desc = &bad_irq_desc; |
121 | 121 | ||
122 | irq_enter(); | 122 | irq_enter(); |
123 | 123 | #ifdef CONFIG_DEBUG_STACKOVERFLOW | |
124 | /* Debugging check for stack overflow: is there less than STACK_WARN free? */ | ||
125 | { | ||
126 | long sp; | ||
127 | |||
128 | sp = __get_SP() & (THREAD_SIZE-1); | ||
129 | |||
130 | if (unlikely(sp < (sizeof(struct thread_info) + STACK_WARN))) { | ||
131 | dump_stack(); | ||
132 | printk(KERN_EMERG "%s: possible stack overflow while handling irq %i " | ||
133 | " only %ld bytes free\n", | ||
134 | __func__, irq, sp - sizeof(struct thread_info)); | ||
135 | } | ||
136 | } | ||
137 | #endif | ||
124 | generic_handle_irq(irq); | 138 | generic_handle_irq(irq); |
125 | 139 | ||
126 | /* If we're the only interrupt running (ignoring IRQ15 which is for | 140 | /* If we're the only interrupt running (ignoring IRQ15 which is for |