powerpc/watchpoint: Introduce macros for watchpoint length
We are hadrcoding length everywhere in the watchpoint code. Introduce macros for the length and use them. 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/20191017093204.7511-2-ravi.bangoria@linux.ibm.com
This commit is contained in:

committed by
Michael Ellerman

parent
4e706af3cd
commit
b811be615c
@@ -163,9 +163,9 @@ int hw_breakpoint_arch_parse(struct perf_event *bp,
|
||||
*/
|
||||
if (!ppc_breakpoint_available())
|
||||
return -ENODEV;
|
||||
length_max = 8; /* DABR */
|
||||
length_max = DABR_MAX_LEN; /* DABR */
|
||||
if (dawr_enabled()) {
|
||||
length_max = 512 ; /* 64 doublewords */
|
||||
length_max = DAWR_MAX_LEN; /* 64 doublewords */
|
||||
/* DAWR region can't cross 512 boundary */
|
||||
if ((attr->bp_addr >> 9) !=
|
||||
((attr->bp_addr + attr->bp_len - 1) >> 9))
|
||||
|
Reference in New Issue
Block a user