lkml.org 
[lkml]   [2020]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 5/8] powerpc/watchpoint: Fix exception handling for CONFIG_HAVE_HW_BREAKPOINT=N
From
Date
Hi Christophe,

>> diff --git a/arch/powerpc/kernel/ptrace/ptrace-noadv.c b/arch/powerpc/kernel/ptrace/ptrace-noadv.c
>> index 57a0ab822334..866597b407bc 100644
>> --- a/arch/powerpc/kernel/ptrace/ptrace-noadv.c
>> +++ b/arch/powerpc/kernel/ptrace/ptrace-noadv.c
>> @@ -286,11 +286,16 @@ long ppc_del_hwdebug(struct task_struct *child, long data)
>>       }
>>       return ret;
>>   #else /* CONFIG_HAVE_HW_BREAKPOINT */
>> +    if (child->thread.hw_brk[data - 1].flags & HW_BRK_FLAG_DISABLED)
>
> I think child->thread.hw_brk[data - 1].flags & HW_BRK_FLAG_DISABLED should go around additionnal ()

Not sure I follow.

>
>> +        goto del;
>> +
>>       if (child->thread.hw_brk[data - 1].address == 0)
>>           return -ENOENT;
>
> What about replacing the above if by:
>     if (!(child->thread.hw_brk[data - 1].flags) & HW_BRK_FLAG_DISABLED) &&
>         child->thread.hw_brk[data - 1].address == 0)
>         return -ENOENT;
okay.. that's more compact.

But more importantly, what I wanted to know is whether CONFIG_HAVE_HW_BREAKPOINT
is set or not in production/distro builds for 8xx. Because I see it's not set in
8xx defconfigs.

Thanks,
Ravi

\
 
 \ /
  Last update: 2020-08-25 13:09    [W:0.050 / U:0.960 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site