summaryrefslogtreecommitdiff
path: root/cpu/blackfin/traps.c
diff options
context:
space:
mode:
authorMinkyu Kang <mk7.kang@samsung.com>2010-01-19 09:12:48 +0900
committerMinkyu Kang <mk7.kang@samsung.com>2010-01-19 09:12:48 +0900
commitb097d552bc9ee0351bb0c3d1219856e845df59f9 (patch)
tree3b2b8391ec989d9a8b561ce8234dde3b1d481880 /cpu/blackfin/traps.c
parente598dfc22c8789991d165714bec53b2390fc999d (diff)
parenta7709d926dbc7cb1541034fcf2b21ce3e838cb12 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'cpu/blackfin/traps.c')
-rw-r--r--cpu/blackfin/traps.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/cpu/blackfin/traps.c b/cpu/blackfin/traps.c
index 7e7c74ce473..becc36e6a99 100644
--- a/cpu/blackfin/traps.c
+++ b/cpu/blackfin/traps.c
@@ -100,6 +100,14 @@ void trap_c(struct pt_regs *regs)
uint32_t new_cplb_addr = 0, new_cplb_data = 0;
static size_t last_evicted;
size_t i;
+ unsigned long tflags;
+
+ /*
+ * Keep the trace buffer so that a miss here points people
+ * to the right place (their code). Crashes here rarely
+ * happen. If they do, only the Blackfin maintainer cares.
+ */
+ trace_buffer_save(tflags);
new_cplb_addr = (data ? bfin_read_DCPLB_FAULT_ADDR() : bfin_read_ICPLB_FAULT_ADDR()) & ~(4 * 1024 * 1024 - 1);
@@ -156,6 +164,7 @@ void trap_c(struct pt_regs *regs)
for (i = 0; i < 16; ++i)
debug("%2i 0x%p 0x%08X\n", i, *CPLB_ADDR++, *CPLB_DATA++);
+ trace_buffer_restore(tflags);
break;
}