diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2008-08-05 06:28:26 -0400 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-08-05 06:28:26 -0400 |
commit | d6a29891369827317659b7833170d2f5f0c7b97f (patch) | |
tree | d93efcc44012c838e8b8f13466c06ee4be20df6d /arch/blackfin/mach-common/entry.S | |
parent | fe5aeb93024791a5aa69741015db33093198ff47 (diff) |
Blackfin arch: Fix bugs - Make kgdb code apparent to app debugging.
- Skip single step if global interrupt disable bit is set.
- Extend bernds' patch r4673 to skip single step in any interrupt entry
that interrupts the code which is under single stepping. Bernds' patch
only allow user space single stepping.
Singed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/mach-common/entry.S')
-rw-r--r-- | arch/blackfin/mach-common/entry.S | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S index 3db2f4df261b..4bd971e81f1f 100644 --- a/arch/blackfin/mach-common/entry.S +++ b/arch/blackfin/mach-common/entry.S | |||
@@ -163,6 +163,8 @@ ENTRY(_ex_single_step) | |||
163 | p5.l = lo(IPEND); | 163 | p5.l = lo(IPEND); |
164 | p5.h = hi(IPEND); | 164 | p5.h = hi(IPEND); |
165 | r6 = [p5]; | 165 | r6 = [p5]; |
166 | cc = bittst(r6, 4); | ||
167 | if cc jump _bfin_return_from_exception; | ||
166 | cc = bittst(r6, 5); | 168 | cc = bittst(r6, 5); |
167 | if cc jump _bfin_return_from_exception; | 169 | if cc jump _bfin_return_from_exception; |
168 | 170 | ||
@@ -186,10 +188,9 @@ ENTRY(_ex_single_step) | |||
186 | if cc jump .Ldo_single_step; | 188 | if cc jump .Ldo_single_step; |
187 | r6 += -1; | 189 | r6 += -1; |
188 | cc = r6 < r7; | 190 | cc = r6 < r7; |
189 | if cc jump _bfin_return_from_exception; | 191 | if cc jump 1f; |
190 | .Ldo_single_step: | 192 | .Ldo_single_step: |
191 | #endif | 193 | #else |
192 | |||
193 | /* If we were in user mode, do the single step normally. */ | 194 | /* If we were in user mode, do the single step normally. */ |
194 | p5.l = lo(IPEND); | 195 | p5.l = lo(IPEND); |
195 | p5.h = hi(IPEND); | 196 | p5.h = hi(IPEND); |
@@ -198,6 +199,7 @@ ENTRY(_ex_single_step) | |||
198 | r7 = r7 & r6; | 199 | r7 = r7 & r6; |
199 | cc = r7 == 0; | 200 | cc = r7 == 0; |
200 | if !cc jump 1f; | 201 | if !cc jump 1f; |
202 | #endif | ||
201 | 203 | ||
202 | /* Single stepping only a single instruction, so clear the trace | 204 | /* Single stepping only a single instruction, so clear the trace |
203 | * bit here. */ | 205 | * bit here. */ |