UPSTREAM: arm64: Allow hw watchpoint at varied offset from base address
authorPratyush Anand <panand@redhat.com>
Mon, 14 Nov 2016 14:02:43 +0000 (19:32 +0530)
committerAmit Pundir <amit.pundir@linaro.org>
Mon, 10 Apr 2017 07:42:16 +0000 (13:12 +0530)
commit29dbff68c9df0610f77968f2511c1928e0c80f07
treec0906d60ceff69753c04031b870b878359fd4620
parent48e38a939ec533ccc28849785c9c729e0e80fbfe
UPSTREAM: arm64: Allow hw watchpoint at varied offset from base address

ARM64 hardware supports watchpoint at any double word aligned address.
However, it can select any consecutive bytes from offset 0 to 7 from that
base address. For example, if base address is programmed as 0x420030 and
byte select is 0x1C, then access of 0x420032,0x420033 and 0x420034 will
generate a watchpoint exception.

Currently, we do not have such modularity. We can only program byte,
halfword, word and double word access exception from any base address.

This patch adds support to overcome above limitations.

Signed-off-by: Pratyush Anand <panand@redhat.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Pavel Labath <labath@google.com>
Change-Id: I28b1ca63f63182c10c3d6b6b3bacf6c56887ddbe
Bug: 30919905
arch/arm64/include/asm/hw_breakpoint.h
arch/arm64/kernel/hw_breakpoint.c
arch/arm64/kernel/ptrace.c