From 2ebcade590dcf822dcdadcc4f8f68efd3ff2e217 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Tue, 9 Oct 2007 17:24:30 +0800 Subject: Blackfin arch: fix endless loop bug when a double fault happens Today when a double fault happens (exception during an exception handling event), we go into an endless loop, with nothing comming out the UART. With this patch, we actually see that we have commited a double fault event Signed-off-by: Robin Getz Signed-off-by: Bryan Wu --- arch/blackfin/kernel/traps.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'arch/blackfin/kernel') diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 1a8a5f171bc8..ba68eb2ec929 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c @@ -132,6 +132,14 @@ static int printk_address(unsigned long address) } #endif +asmlinkage void double_fault_c(struct pt_regs *fp) +{ + printk(KERN_EMERG "\n" KERN_EMERG "Double Fault\n"); + dump_bfin_regs(fp, (void *)fp->retx); + panic("Double Fault - unrecoverable event\n"); + +} + asmlinkage void trap_c(struct pt_regs *fp) { #ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON -- cgit v1.2.3-59-g8ed1b