summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/xmon
diff options
context:
space:
mode:
authorRavi Bangoria <ravi.bangoria@linux.ibm.com>2020-09-02 06:29:43 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2020-09-15 14:13:20 +0200
commit58da5984d2ea6d95f3f9d9e8dd9f7e1b0dddfb3c (patch)
treefc345e46c0b27dd5e8e0a43c527096113b3f4ef5 /arch/powerpc/xmon
parentpowerpc/watchpoint: Fix exception handling for CONFIG_HAVE_HW_BREAKPOINT=N (diff)
downloadlinux-58da5984d2ea6d95f3f9d9e8dd9f7e1b0dddfb3c.tar.xz
linux-58da5984d2ea6d95f3f9d9e8dd9f7e1b0dddfb3c.zip
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
Diffstat (limited to 'arch/powerpc/xmon')
-rw-r--r--arch/powerpc/xmon/xmon.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index df7bca00f5ec..55c43a6c9111 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -969,6 +969,7 @@ static void insert_cpu_bpts(void)
brk.address = dabr[i].address;
brk.type = (dabr[i].enabled & HW_BRK_TYPE_DABR) | HW_BRK_TYPE_PRIV_ALL;
brk.len = 8;
+ brk.hw_len = 8;
__set_breakpoint(i, &brk);
}
}