summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2012-08-16 20:02:12 +0200
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-08-25 10:15:23 +0200
commitd968d2b801d877601d54e35e6dd0f52d9c797c99 (patch)
treea6eba5aeb70163347d32bb01b6fb6e3e2609ce40 /arch
parentARM: 7496/1: hw_breakpoint: don't rely on dfsr to show watchpoint access type (diff)
downloadlinux-d968d2b801d877601d54e35e6dd0f52d9c797c99.tar.xz
linux-d968d2b801d877601d54e35e6dd0f52d9c797c99.zip
ARM: 7497/1: hw_breakpoint: allow single-byte watchpoints on all addresses
Breakpoint validation currently fails for single-byte watchpoints on addresses ending in 11b. There is no reason to forbid such a watchpoint, so extend the validation code to allow it. Cc: Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kernel/hw_breakpoint.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c
index 18d39ea4c02f..281bf3301241 100644
--- a/arch/arm/kernel/hw_breakpoint.c
+++ b/arch/arm/kernel/hw_breakpoint.c
@@ -610,13 +610,14 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp)
/* Aligned */
break;
case 1:
- /* Allow single byte watchpoint. */
- if (info->ctrl.len == ARM_BREAKPOINT_LEN_1)
- break;
case 2:
/* Allow halfword watchpoints and breakpoints. */
if (info->ctrl.len == ARM_BREAKPOINT_LEN_2)
break;
+ case 3:
+ /* Allow single byte watchpoint. */
+ if (info->ctrl.len == ARM_BREAKPOINT_LEN_1)
+ break;
default:
ret = -EINVAL;
goto out;