lkml.org 
[lkml]   [2020]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 03/16] powerpc/watchpoint: Introduce function to get nr watchpoints dynamically
From
Date


Le 01/04/2020 à 08:50, Ravi Bangoria a écrit :
>
>
> On 4/1/20 11:59 AM, Christophe Leroy wrote:
>>
>>
>> Le 01/04/2020 à 08:12, Ravi Bangoria a écrit :
>>> So far we had only one watchpoint, so we have hardcoded HBP_NUM to 1.
>>> But future Power architecture is introducing 2nd DAWR and thus kernel
>>> should be able to dynamically find actual number of watchpoints
>>> supported by hw it's running on. Introduce function for the same.
>>> Also convert HBP_NUM macro to HBP_NUM_MAX, which will now represent
>>> maximum number of watchpoints supported by Powerpc.
>>
>>
>> Everywhere else in the code, it is called 'breakpoint', not 'watchpoint'.
>>
>> Wouldn't it be more consistent to call the function nr_bp_slots()
>> instead of nr_wp_slots() ?
>>
>> Especially as we are likely going to extend your changes to support
>> DABR2 in addition to DABR on BOOK3S/32.
>
> Sure. I don't have strong onion for nr_wp_slots() and I can rename it to
> nr_bp_slots(). but...
>
> Even though existing code uses breakpoint and watchpoint interchangeably,
> I'm using wp/watchpoint to represent data-breakpoint, to distinguish it
> from instruction-breakpoint (CIABR). So IMHO, nr_wp_slots() should return
> number DAWRs/DABRs and nr_bp_slots() should return number of CIABRs. Is
> that okay?
>


Yes that makes sense too. Up to you.

Christophe

\
 
 \ /
  Last update: 2020-04-01 09:06    [W:0.271 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site