From fa133b6bf028e8dce5694b6a41538cf7de87fc05 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Fri, 16 Dec 2016 04:38:53 +0000 Subject: [PATCH] Use the right bitwise OR operation for clearing single-step at trap time. DBCR0_IDM || DBCRO_IC yields 1, which in this register is DBCR0_FT, not what we want. Reported by: Mark Millard MFC after: 2 weeks --- sys/powerpc/powerpc/trap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/powerpc/powerpc/trap.c b/sys/powerpc/powerpc/trap.c index b3217628943..a98b5c77ef5 100644 --- a/sys/powerpc/powerpc/trap.c +++ b/sys/powerpc/powerpc/trap.c @@ -280,7 +280,7 @@ trap(struct trapframe *frame) case EXC_DEBUG: /* Single stepping */ mtspr(SPR_DBSR, mfspr(SPR_DBSR)); frame->srr1 &= ~PSL_DE; - frame->cpu.booke.dbcr0 &= ~(DBCR0_IDM || DBCR0_IC); + frame->cpu.booke.dbcr0 &= ~(DBCR0_IDM | DBCR0_IC); sig = SIGTRAP; ucode = TRAP_TRACE; break;