diff options
-rw-r--r-- | arch/blackfin/mach-common/entry.S | 7 | ||||
-rw-r--r-- | include/asm-blackfin/trace.h | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S index cee54cebbc65..a504c65d9990 100644 --- a/arch/blackfin/mach-common/entry.S +++ b/arch/blackfin/mach-common/entry.S | |||
@@ -121,10 +121,14 @@ ENTRY(_ex_icplb_miss) | |||
121 | (R7:6,P5:4) = [sp++]; | 121 | (R7:6,P5:4) = [sp++]; |
122 | ASTAT = [sp++]; | 122 | ASTAT = [sp++]; |
123 | SAVE_ALL_SYS | 123 | SAVE_ALL_SYS |
124 | DEBUG_HWTRACE_SAVE(p5, r7) | ||
125 | #ifdef CONFIG_MPU | 124 | #ifdef CONFIG_MPU |
125 | /* We must load R1 here, _before_ DEBUG_HWTRACE_SAVE, since that | ||
126 | * will change the stack pointer. */ | ||
126 | R0 = SEQSTAT; | 127 | R0 = SEQSTAT; |
127 | R1 = SP; | 128 | R1 = SP; |
129 | #endif | ||
130 | DEBUG_HWTRACE_SAVE(p5, r7) | ||
131 | #ifdef CONFIG_MPU | ||
128 | sp += -12; | 132 | sp += -12; |
129 | call _cplb_hdr; | 133 | call _cplb_hdr; |
130 | sp += 12; | 134 | sp += 12; |
@@ -191,6 +195,7 @@ ENTRY(_bfin_return_from_exception) | |||
191 | ENDPROC(_bfin_return_from_exception) | 195 | ENDPROC(_bfin_return_from_exception) |
192 | 196 | ||
193 | ENTRY(_handle_bad_cplb) | 197 | ENTRY(_handle_bad_cplb) |
198 | DEBUG_HWTRACE_RESTORE(p5, r7) | ||
194 | /* To get here, we just tried and failed to change a CPLB | 199 | /* To get here, we just tried and failed to change a CPLB |
195 | * so, handle things in trap_c (C code), by lowering to | 200 | * so, handle things in trap_c (C code), by lowering to |
196 | * IRQ5, just like we normally do. Since this is not a | 201 | * IRQ5, just like we normally do. Since this is not a |
diff --git a/include/asm-blackfin/trace.h b/include/asm-blackfin/trace.h index ef18afbc2101..312b596b9731 100644 --- a/include/asm-blackfin/trace.h +++ b/include/asm-blackfin/trace.h | |||
@@ -62,14 +62,14 @@ extern unsigned long software_trace_buff[]; | |||
62 | preg.L = LO(TBUFCTL); \ | 62 | preg.L = LO(TBUFCTL); \ |
63 | preg.H = HI(TBUFCTL); \ | 63 | preg.H = HI(TBUFCTL); \ |
64 | dreg = [preg]; \ | 64 | dreg = [preg]; \ |
65 | [sp++] = dreg; \ | 65 | [--sp] = dreg; \ |
66 | dreg = 0x1; \ | 66 | dreg = 0x1; \ |
67 | [preg] = dreg; | 67 | [preg] = dreg; |
68 | 68 | ||
69 | #define trace_buffer_restore(preg, dreg) \ | 69 | #define trace_buffer_restore(preg, dreg) \ |
70 | preg.L = LO(TBUFCTL); \ | 70 | preg.L = LO(TBUFCTL); \ |
71 | preg.H = HI(TBUFCTL); \ | 71 | preg.H = HI(TBUFCTL); \ |
72 | dreg = [sp--]; \ | 72 | dreg = [sp++]; \ |
73 | [preg] = dreg; | 73 | [preg] = dreg; |
74 | 74 | ||
75 | #else /* CONFIG_DEBUG_BFIN_HWTRACE_ON */ | 75 | #else /* CONFIG_DEBUG_BFIN_HWTRACE_ON */ |