summaryrefslogtreecommitdiffstats
path: root/libpdbg/p8chip.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpdbg/p8chip.c')
-rw-r--r--libpdbg/p8chip.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libpdbg/p8chip.c b/libpdbg/p8chip.c
index 6640bb4..3e90c8d 100644
--- a/libpdbg/p8chip.c
+++ b/libpdbg/p8chip.c
@@ -127,8 +127,7 @@ static struct thread_state get_thread_status(struct thread *thread)
/* Need to activete debug mode to get complete status */
pib_read(&thread->target, RAS_MODE_REG, &mode_reg);
- mode_reg |= MR_THREAD_IN_DEBUG;
- pib_write(&thread->target, RAS_MODE_REG, mode_reg);
+ pib_write(&thread->target, RAS_MODE_REG, mode_reg | MR_THREAD_IN_DEBUG);
/* Read status */
pib_read(&thread->target, RAS_STATUS_REG, &val);
@@ -194,7 +193,6 @@ static struct thread_state get_thread_status(struct thread *thread)
}
/* Clear debug mode */
- mode_reg &= ~MR_THREAD_IN_DEBUG;
pib_write(&thread->target, RAS_MODE_REG, mode_reg);
return thread_status;
OpenPOWER on IntegriCloud