aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/hw_breakpoint.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64/kernel/hw_breakpoint.c')
-rw-r--r--arch/arm64/kernel/hw_breakpoint.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/arm64/kernel/hw_breakpoint.c b/arch/arm64/kernel/hw_breakpoint.c
index dceb84520948..38ee1514cd9c 100644
--- a/arch/arm64/kernel/hw_breakpoint.c
+++ b/arch/arm64/kernel/hw_breakpoint.c
@@ -536,13 +536,18 @@ int hw_breakpoint_arch_parse(struct perf_event *bp,
536 /* Aligned */ 536 /* Aligned */
537 break; 537 break;
538 case 1: 538 case 1:
539 /* Allow single byte watchpoint. */
540 if (hw->ctrl.len == ARM_BREAKPOINT_LEN_1)
541 break;
542 case 2: 539 case 2:
543 /* Allow halfword watchpoints and breakpoints. */ 540 /* Allow halfword watchpoints and breakpoints. */
544 if (hw->ctrl.len == ARM_BREAKPOINT_LEN_2) 541 if (hw->ctrl.len == ARM_BREAKPOINT_LEN_2)
545 break; 542 break;
543
544 /* Fallthrough */
545 case 3:
546 /* Allow single byte watchpoint. */
547 if (hw->ctrl.len == ARM_BREAKPOINT_LEN_1)
548 break;
549
550 /* Fallthrough */
546 default: 551 default:
547 return -EINVAL; 552 return -EINVAL;
548 } 553 }