powerpc/watchpoint: Add hw_len wherever missing
authorRavi Bangoria <ravi.bangoria@linux.ibm.com>
Wed, 2 Sep 2020 04:29:43 +0000 (09:59 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 15 Sep 2020 12:13:20 +0000 (22:13 +1000)
commit58da5984d2ea6d95f3f9d9e8dd9f7e1b0dddfb3c
treefc345e46c0b27dd5e8e0a43c527096113b3f4ef5
parent5b905d77987de065bdd3a2906816b5f143df087b
powerpc/watchpoint: Add hw_len wherever missing

There are couple of places where we set len but not hw_len. For
ptrace/perf watchpoints, when CONFIG_HAVE_HW_BREAKPOINT=Y, hw_len
will be calculated and set internally while parsing watchpoint.
But when CONFIG_HAVE_HW_BREAKPOINT=N, we need to manually set
'hw_len'. Similarly for xmon as well, hw_len needs to be set
directly.

Fixes: b57aeab811db ("powerpc/watchpoint: Fix length calculation for unaligned target")
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200902042945.129369-7-ravi.bangoria@linux.ibm.com
arch/powerpc/kernel/ptrace/ptrace-noadv.c
arch/powerpc/xmon/xmon.c