diff options
author | Will Deacon <will.deacon@arm.com> | 2012-08-16 14:02:12 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-08-25 04:15:23 -0400 |
commit | d968d2b801d877601d54e35e6dd0f52d9c797c99 (patch) | |
tree | a6eba5aeb70163347d32bb01b6fb6e3e2609ce40 /arch | |
parent | bf8801145c01ab600f8df66e8c879ac642fa5846 (diff) |
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.c | 7 |
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) | |||
610 | /* Aligned */ | 610 | /* Aligned */ |
611 | break; | 611 | break; |
612 | case 1: | 612 | case 1: |
613 | /* Allow single byte watchpoint. */ | ||
614 | if (info->ctrl.len == ARM_BREAKPOINT_LEN_1) | ||
615 | break; | ||
616 | case 2: | 613 | case 2: |
617 | /* Allow halfword watchpoints and breakpoints. */ | 614 | /* Allow halfword watchpoints and breakpoints. */ |
618 | if (info->ctrl.len == ARM_BREAKPOINT_LEN_2) | 615 | if (info->ctrl.len == ARM_BREAKPOINT_LEN_2) |
619 | break; | 616 | break; |
617 | case 3: | ||
618 | /* Allow single byte watchpoint. */ | ||
619 | if (info->ctrl.len == ARM_BREAKPOINT_LEN_1) | ||
620 | break; | ||
620 | default: | 621 | default: |
621 | ret = -EINVAL; | 622 | ret = -EINVAL; |
622 | goto out; | 623 | goto out; |