Re: [PATCH] powerpc/hw_breakpoint: move instruction stepping out of hw_breakpoint_handler()

From
Ravi Bangoria <hidden>
Date
2019-07-03 06:20:30
Also in
lkml
Reply to
Christophe Leroy, 2019-06-28

On 6/28/19 9:25 PM, Christophe Leroy wrote:
On 8xx, breakpoints stop after executing the instruction, so
stepping/emulation is not needed. Move it into a sub-function and
remove the #ifdefs.

Signed-off-by: Christophe Leroy <redacted>
---
Reviewed-by: Ravi Bangoria <redacted>

Just one neat below...

[...]
quoted hunk ↗ jump to hunk
-#ifndef CONFIG_PPC_8xx
-	/* Do not emulate user-space instructions, instead single-step them */
-	if (user_mode(regs)) {
-		current->thread.last_hit_ubp = bp;
-		regs->msr |= MSR_SE;
+	if (!IS_ENABLED(CONFIG_PPC_8xx) && !stepping_handler(regs, bp, info->address))
May be split this line. It's 86 chars long and checkpatch.pl is warning
about this:

WARNING: line over 80 characters
#257: FILE: arch/powerpc/kernel/hw_breakpoint.c:282:
+	if (!IS_ENABLED(CONFIG_PPC_8xx) && !stepping_handler(regs, bp, info->address))
Thread (5 messages) 5 messages, 3 authors, last reply 2019-08-22
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help