mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 05:31:32 +00:00
Blackfin: keep hwtrace on CPLB miss
Crashes rarely happen in the CPLB miss handler compared to the rest of U-Boot code, so disable hardware tracing when processing misses. This way a crash due to other functions will be shown properly. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
0097870e3d
commit
b6db283440
1 changed files with 9 additions and 0 deletions
|
@ -100,6 +100,14 @@ void trap_c(struct pt_regs *regs)
|
||||||
uint32_t new_cplb_addr = 0, new_cplb_data = 0;
|
uint32_t new_cplb_addr = 0, new_cplb_data = 0;
|
||||||
static size_t last_evicted;
|
static size_t last_evicted;
|
||||||
size_t i;
|
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);
|
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)
|
for (i = 0; i < 16; ++i)
|
||||||
debug("%2i 0x%p 0x%08X\n", i, *CPLB_ADDR++, *CPLB_DATA++);
|
debug("%2i 0x%p 0x%08X\n", i, *CPLB_ADDR++, *CPLB_DATA++);
|
||||||
|
|
||||||
|
trace_buffer_restore(tflags);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue