]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/arm64/kernel/hw_breakpoint.c
Merge tag 'xfs-4.12-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
[karo-tx-linux.git] / arch / arm64 / kernel / hw_breakpoint.c
index 0296e79242402008837da11d97cfe682d711c18e..749f81779420c7bab2ead0d8f5b9a6cf108e6a45 100644 (file)
@@ -36,6 +36,7 @@
 #include <asm/traps.h>
 #include <asm/cputype.h>
 #include <asm/system_misc.h>
+#include <asm/uaccess.h>
 
 /* Breakpoint currently in use for each BRP. */
 static DEFINE_PER_CPU(struct perf_event *, bp_on_reg[ARM_MAX_BRP]);
@@ -721,6 +722,8 @@ static u64 get_distance_from_watchpoint(unsigned long addr, u64 val,
        u64 wp_low, wp_high;
        u32 lens, lene;
 
+       addr = untagged_addr(addr);
+
        lens = __ffs(ctrl->len);
        lene = __fls(ctrl->len);