diff options
author | Robin Getz <robin.getz@analog.com> | 2007-12-24 02:27:56 -0500 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2007-12-24 02:27:56 -0500 |
commit | d8f66c8c1ea8e948483ee4739ad91120f5f7de51 (patch) | |
tree | 073d95f10f3e8e934e5c978b4b9920e8ee93a321 /arch/blackfin/kernel/traps.c | |
parent | 13fe24f37df20e580a5a364e67ec8cf3219d8f8c (diff) |
[Blackfin] arch: fix bug gdb testing on hardware has regression
http://blackfin.uclinux.org/gf/project/toolchain/tracker/?action=TrackerItemEdit&tracker_item_id=3651
As Bernd predicted, this was only necessary because of other
problems in the kenel - fixing those, and this is not necessary, so
remove it.
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch/blackfin/kernel/traps.c')
-rw-r--r-- | arch/blackfin/kernel/traps.c | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 4be5ff0be60f..8bbfef31666b 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <asm/cacheflush.h> | 36 | #include <asm/cacheflush.h> |
37 | #include <asm/blackfin.h> | 37 | #include <asm/blackfin.h> |
38 | #include <asm/irq_handler.h> | 38 | #include <asm/irq_handler.h> |
39 | #include <linux/irq.h> | ||
39 | #include <asm/trace.h> | 40 | #include <asm/trace.h> |
40 | #include <asm/fixed_code.h> | 41 | #include <asm/fixed_code.h> |
41 | 42 | ||
@@ -508,13 +509,6 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
508 | info.si_addr = (void *)fp->pc; | 509 | info.si_addr = (void *)fp->pc; |
509 | force_sig_info(sig, &info, current); | 510 | force_sig_info(sig, &info, current); |
510 | 511 | ||
511 | /* Ensure that bad return addresses don't end up in an infinite | ||
512 | * loop, due to speculative loads/reads. This needs to be done after | ||
513 | * the signal has been sent. | ||
514 | */ | ||
515 | if (trapnr == VEC_CPLB_I_M && sig != SIGTRAP) | ||
516 | fp->pc = SAFE_USER_INSTRUCTION; | ||
517 | |||
518 | trace_buffer_restore(j); | 512 | trace_buffer_restore(j); |
519 | return; | 513 | return; |
520 | } | 514 | } |
@@ -727,6 +721,9 @@ void dump_bfin_mem(void *retaddr) | |||
727 | void show_regs(struct pt_regs *fp) | 721 | void show_regs(struct pt_regs *fp) |
728 | { | 722 | { |
729 | char buf [150]; | 723 | char buf [150]; |
724 | struct irqaction *action; | ||
725 | unsigned int i; | ||
726 | unsigned long flags; | ||
730 | 727 | ||
731 | printk(KERN_NOTICE "\n" KERN_NOTICE "SEQUENCER STATUS:\n"); | 728 | printk(KERN_NOTICE "\n" KERN_NOTICE "SEQUENCER STATUS:\n"); |
732 | printk(KERN_NOTICE " SEQSTAT: %08lx IPEND: %04lx SYSCFG: %04lx\n", | 729 | printk(KERN_NOTICE " SEQSTAT: %08lx IPEND: %04lx SYSCFG: %04lx\n", |
@@ -735,6 +732,32 @@ void show_regs(struct pt_regs *fp) | |||
735 | (fp->seqstat & SEQSTAT_HWERRCAUSE) >> 14); | 732 | (fp->seqstat & SEQSTAT_HWERRCAUSE) >> 14); |
736 | printk(KERN_NOTICE " EXCAUSE : 0x%lx\n", | 733 | printk(KERN_NOTICE " EXCAUSE : 0x%lx\n", |
737 | fp->seqstat & SEQSTAT_EXCAUSE); | 734 | fp->seqstat & SEQSTAT_EXCAUSE); |
735 | for (i = 6; i <= 15 ; i++) { | ||
736 | if (fp->ipend & (1 << i)) { | ||
737 | decode_address(buf, bfin_read32(EVT0 + 4*i)); | ||
738 | printk(KERN_NOTICE " physical IVG%i asserted : %s\n", i, buf); | ||
739 | } | ||
740 | } | ||
741 | |||
742 | /* if no interrupts are going off, don't print this out */ | ||
743 | if (fp->ipend & ~0x3F) { | ||
744 | for (i = 0; i < (NR_IRQS - 1); i++) { | ||
745 | spin_lock_irqsave(&irq_desc[i].lock, flags); | ||
746 | action = irq_desc[i].action; | ||
747 | if (!action) | ||
748 | goto unlock; | ||
749 | |||
750 | decode_address(buf, (unsigned int)action->handler); | ||
751 | printk(KERN_NOTICE " logical irq %3d mapped : %s", i, buf); | ||
752 | for (action = action->next; action; action = action->next) { | ||
753 | decode_address(buf, (unsigned int)action->handler); | ||
754 | printk(", %s", buf); | ||
755 | } | ||
756 | printk("\n"); | ||
757 | unlock: | ||
758 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | ||
759 | } | ||
760 | } | ||
738 | 761 | ||
739 | decode_address(buf, fp->rete); | 762 | decode_address(buf, fp->rete); |
740 | printk(KERN_NOTICE " RETE: %s\n", buf); | 763 | printk(KERN_NOTICE " RETE: %s\n", buf); |