aboutsummaryrefslogtreecommitdiff
path: root/sys/powerpc/booke/machdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/powerpc/booke/machdep.c')
-rw-r--r--sys/powerpc/booke/machdep.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/powerpc/booke/machdep.c b/sys/powerpc/booke/machdep.c
index 1803ef23abc5..e42aa8c77f0c 100644
--- a/sys/powerpc/booke/machdep.c
+++ b/sys/powerpc/booke/machdep.c
@@ -806,14 +806,10 @@ int
ptrace_single_step(struct thread *td)
{
struct trapframe *tf;
- u_int reg;
-
- reg = mfspr(SPR_DBCR0);
- reg |= DBCR0_IC | DBCR0_IDM;
- mtspr(SPR_DBCR0, reg);
tf = td->td_frame;
tf->srr1 |= PSL_DE;
+ tf->cpu.booke.dbcr0 |= (DBCR0_IDM | DBCR0_IC);
return (0);
}
@@ -824,6 +820,7 @@ ptrace_clear_single_step(struct thread *td)
tf = td->td_frame;
tf->srr1 &= ~PSL_DE;
+ tf->cpu.booke.dbcr0 &= ~(DBCR0_IDM | DBCR0_IC);
return (0);
}