Re: [PATCH 5/5] Powerpc/Watchpoint: Fix length calculation for unaligned target

2019-06-19 Thread Ravi Bangoria
On 6/18/19 7:02 PM, Michael Neuling wrote: > On Tue, 2019-06-18 at 09:57 +0530, Ravi Bangoria wrote: >> Watchpoint match range is always doubleword(8 bytes) aligned on >> powerpc. If the given range is crossing doubleword boundary, we >> need to increase the length such that next doubleword also

Re: [PATCH 5/5] Powerpc/Watchpoint: Fix length calculation for unaligned target

2019-06-18 Thread Ravi Bangoria
On 6/18/19 12:16 PM, Christophe Leroy wrote: >>   +/* Maximum len for DABR is 8 bytes and DAWR is 512 bytes */ >> +static int hw_breakpoint_validate_len(struct arch_hw_breakpoint *hw) >> +{ >> +    u16 length_max = 8; >> +    u16 final_len; > > You should be more consistent in naming. If one is

Re: [PATCH 5/5] Powerpc/Watchpoint: Fix length calculation for unaligned target

2019-06-18 Thread Michael Neuling
On Tue, 2019-06-18 at 09:57 +0530, Ravi Bangoria wrote: > Watchpoint match range is always doubleword(8 bytes) aligned on > powerpc. If the given range is crossing doubleword boundary, we > need to increase the length such that next doubleword also get > covered. Ex, > > address len =

Re: [PATCH 5/5] Powerpc/Watchpoint: Fix length calculation for unaligned target

2019-06-17 Thread Christophe Leroy
Le 18/06/2019 à 06:27, Ravi Bangoria a écrit : Watchpoint match range is always doubleword(8 bytes) aligned on powerpc. If the given range is crossing doubleword boundary, we need to increase the length such that next doubleword also get covered. Ex, address len = 6 bytes

[PATCH 5/5] Powerpc/Watchpoint: Fix length calculation for unaligned target

2019-06-17 Thread Ravi Bangoria
Watchpoint match range is always doubleword(8 bytes) aligned on powerpc. If the given range is crossing doubleword boundary, we need to increase the length such that next doubleword also get covered. Ex, address len = 6 bytes |=. |v--|--v-