summaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
authorSonic Zhang <sonic.zhang@analog.com>2008-08-05 18:28:26 +0800
committerBryan Wu <cooloney@kernel.org>2008-08-05 18:28:26 +0800
commitd6a29891369827317659b7833170d2f5f0c7b97f (patch)
treed93efcc44012c838e8b8f13466c06ee4be20df6d /arch/blackfin
parentfe5aeb93024791a5aa69741015db33093198ff47 (diff)
downloadlinux-d6a29891369827317659b7833170d2f5f0c7b97f.tar.bz2
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')
-rw-r--r--arch/blackfin/mach-common/entry.S8
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)
p5.l = lo(IPEND);
p5.h = hi(IPEND);
r6 = [p5];
+ cc = bittst(r6, 4);
+ if cc jump _bfin_return_from_exception;
cc = bittst(r6, 5);
if cc jump _bfin_return_from_exception;
@@ -186,10 +188,9 @@ ENTRY(_ex_single_step)
if cc jump .Ldo_single_step;
r6 += -1;
cc = r6 < r7;
- if cc jump _bfin_return_from_exception;
+ if cc jump 1f;
.Ldo_single_step:
-#endif
-
+#else
/* If we were in user mode, do the single step normally. */
p5.l = lo(IPEND);
p5.h = hi(IPEND);
@@ -198,6 +199,7 @@ ENTRY(_ex_single_step)
r7 = r7 & r6;
cc = r7 == 0;
if !cc jump 1f;
+#endif
/* Single stepping only a single instruction, so clear the trace
* bit here. */