diff options
author | Mike Frysinger <vapier.adi@gmail.com> | 2008-02-02 02:47:24 -0500 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2008-02-02 02:47:24 -0500 |
commit | 80f31c8a03d2f0644d0ceaf14e7e0108a007c962 (patch) | |
tree | 71af89f61a1e9f969b9d24977e97ed5982f98237 /arch/blackfin | |
parent | a3acf52885a2312efb30a043062ef88dc3813082 (diff) |
[Blackfin] arch: change the trace buffer control start/stop logic in the exception handlers
To save/restore the trace buffer control so that if we take an exception
after turning off the trace buffer at a higher level we dont inadvertently
turn the trace buffer back on
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/mach-common/entry.S | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S index fdd9bf43361e..2cbb7a0bc38e 100644 --- a/arch/blackfin/mach-common/entry.S +++ b/arch/blackfin/mach-common/entry.S | |||
@@ -121,6 +121,7 @@ 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) | ||
124 | #ifdef CONFIG_MPU | 125 | #ifdef CONFIG_MPU |
125 | R0 = SEQSTAT; | 126 | R0 = SEQSTAT; |
126 | R1 = SP; | 127 | R1 = SP; |
@@ -132,14 +133,13 @@ ENTRY(_ex_icplb_miss) | |||
132 | #else | 133 | #else |
133 | call __cplb_hdr; | 134 | call __cplb_hdr; |
134 | #endif | 135 | #endif |
135 | DEBUG_START_HWTRACE(p5, r7) | 136 | DEBUG_HWTRACE_RESTORE(p5, r7) |
136 | RESTORE_ALL_SYS | 137 | RESTORE_ALL_SYS |
137 | SP = EX_SCRATCH_REG; | 138 | SP = EX_SCRATCH_REG; |
138 | rtx; | 139 | rtx; |
139 | ENDPROC(_ex_icplb_miss) | 140 | ENDPROC(_ex_icplb_miss) |
140 | 141 | ||
141 | ENTRY(_ex_syscall) | 142 | ENTRY(_ex_syscall) |
142 | DEBUG_START_HWTRACE(p5, r7) | ||
143 | (R7:6,P5:4) = [sp++]; | 143 | (R7:6,P5:4) = [sp++]; |
144 | ASTAT = [sp++]; | 144 | ASTAT = [sp++]; |
145 | raise 15; /* invoked by TRAP #0, for sys call */ | 145 | raise 15; /* invoked by TRAP #0, for sys call */ |
@@ -178,7 +178,6 @@ ENTRY(_ex_single_step) | |||
178 | ENDPROC(_ex_single_step) | 178 | ENDPROC(_ex_single_step) |
179 | 179 | ||
180 | ENTRY(_bfin_return_from_exception) | 180 | ENTRY(_bfin_return_from_exception) |
181 | DEBUG_START_HWTRACE(p5, r7) | ||
182 | #if ANOMALY_05000257 | 181 | #if ANOMALY_05000257 |
183 | R7=LC0; | 182 | R7=LC0; |
184 | LC0=R7; | 183 | LC0=R7; |
@@ -200,10 +199,9 @@ ENTRY(_handle_bad_cplb) | |||
200 | * need to make a CPLB exception look like a normal exception | 199 | * need to make a CPLB exception look like a normal exception |
201 | */ | 200 | */ |
202 | 201 | ||
203 | DEBUG_START_HWTRACE(p5, r7) | ||
204 | RESTORE_ALL_SYS | 202 | RESTORE_ALL_SYS |
205 | [--sp] = ASTAT; | 203 | [--sp] = ASTAT; |
206 | [--sp] = (R7:6, P5:4); | 204 | [--sp] = (R7:6,P5:4); |
207 | 205 | ||
208 | ENTRY(_ex_replaceable) | 206 | ENTRY(_ex_replaceable) |
209 | nop; | 207 | nop; |
@@ -253,7 +251,6 @@ ENTRY(_ex_trap_c) | |||
253 | R6 = SEQSTAT; | 251 | R6 = SEQSTAT; |
254 | [P5] = R6; | 252 | [P5] = R6; |
255 | 253 | ||
256 | DEBUG_START_HWTRACE(p5, r7) | ||
257 | (R7:6,P5:4) = [sp++]; | 254 | (R7:6,P5:4) = [sp++]; |
258 | ASTAT = [sp++]; | 255 | ASTAT = [sp++]; |
259 | SP = EX_SCRATCH_REG; | 256 | SP = EX_SCRATCH_REG; |
@@ -382,8 +379,7 @@ ENTRY(_trap) /* Exception: 4th entry into system event table(supervisor mode)*/ | |||
382 | sp.h = _exception_stack_top; | 379 | sp.h = _exception_stack_top; |
383 | /* Try to deal with syscalls quickly. */ | 380 | /* Try to deal with syscalls quickly. */ |
384 | [--sp] = ASTAT; | 381 | [--sp] = ASTAT; |
385 | [--sp] = (R7:6, P5:4); | 382 | [--sp] = (R7:6,P5:4); |
386 | DEBUG_STOP_HWTRACE(p5, r7) | ||
387 | r7 = SEQSTAT; /* reason code is in bit 5:0 */ | 383 | r7 = SEQSTAT; /* reason code is in bit 5:0 */ |
388 | r6.l = lo(SEQSTAT_EXCAUSE); | 384 | r6.l = lo(SEQSTAT_EXCAUSE); |
389 | r6.h = hi(SEQSTAT_EXCAUSE); | 385 | r6.h = hi(SEQSTAT_EXCAUSE); |