summaryrefslogtreecommitdiff
path: root/arch/blackfin
diff options
context:
space:
mode:
authorRobin Getz <robin.getz@analog.com>2010-03-29 04:30:40 +0000
committerMike Frysinger <vapier@gentoo.org>2010-05-22 14:19:06 -0400
commita6d9dbf5e4daaf21b33917a809a5ac1e7bce9e05 (patch)
tree2ab2008bb02ebaf13564a94828e91579e02e006b /arch/blackfin
parent5a132f7aeba772e1e1f9ccbad14a6779cd40cdfb (diff)
Blackfin: show the whole accumulator in the pseudo DBG insn
Rather than print just part of the accumulator register, show the whole 40 bits. This matches the simulator behavior better. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/kernel/pseudodbg.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/arch/blackfin/kernel/pseudodbg.c b/arch/blackfin/kernel/pseudodbg.c
index e57ce2f64bf..db85bc94334 100644
--- a/arch/blackfin/kernel/pseudodbg.c
+++ b/arch/blackfin/kernel/pseudodbg.c
@@ -158,7 +158,7 @@ bool execute_pseudodbg_assert(struct pt_regs *fp, unsigned int opcode)
bool execute_pseudodbg(struct pt_regs *fp, unsigned int opcode)
{
int grp, fn, reg;
- long value;
+ long value, value1;
if ((opcode & 0xFF000000) != PseudoDbg_opcode)
return false;
@@ -168,11 +168,24 @@ bool execute_pseudodbg(struct pt_regs *fp, unsigned int opcode)
fn = ((opcode >> PseudoDbg_fn_bits) & PseudoDbg_fn_mask);
reg = ((opcode >> PseudoDbg_reg_bits) & PseudoDbg_reg_mask);
- if (!fix_up_reg(fp, &value, grp, reg))
- return false;
+ if (fn == 3 && (reg == 0 || reg == 1)) {
+ if (!fix_up_reg(fp, &value, 4, 2 * reg))
+ return false;
+ if (!fix_up_reg(fp, &value1, 4, 2 * reg + 1))
+ return false;
- pr_notice("DBG %s = %08lx\n", get_allreg_name(grp, reg), value);
+ pr_notice("DBG A%i = %02lx%08lx\n", reg, value & 0xFF, value1);
+ fp->pc += 2;
+ return true;
- fp->pc += 2;
- return true;
+ } else if (fn == 0) {
+ if (!fix_up_reg(fp, &value, grp, reg))
+ return false;
+
+ pr_notice("DBG %s = %08lx\n", get_allreg_name(grp, reg), value);
+ fp->pc += 2;
+ return true;
+ }
+
+ return false;
}