Re: [PATCH] powerpc/hw_breakpoint: move instruction stepping out of hw_breakpoint_handler()
From: Ravi Bangoria
Date: Sun Jul 07 2019 - 23:41:13 EST
On 7/6/19 1:56 PM, Christophe Leroy wrote:
>
>
> Le 03/07/2019 Ã 08:20, Ravi Bangoria a ÃcritÂ:
>>
>>
>> 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 <christophe.leroy@xxxxxx>
>>> ---
>>
>> Reviewed-by: Ravi Bangoria <ravi.bangoria@xxxxxxxxxxxxx>
>>
>> Just one neat below...
>
> Thanks for the review.
>
>>
>> [...]
>>
>>> -#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:
>
> Didn't you use arch/powerpc/tools/checkpatch.sh ?
>
> powerpc accepts 90 chars per line.
Hmm.. wasn't aware of it. Thanks!