.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * HW_breakpoint: a unified kernel/user-space hardware breakpoint facility, |
---|
3 | 4 | * using the CPU's debug registers. |
---|
4 | 5 | * |
---|
5 | 6 | * Copyright (C) 2012 ARM Limited |
---|
6 | 7 | * Author: Will Deacon <will.deacon@arm.com> |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or modify |
---|
9 | | - * it under the terms of the GNU General Public License version 2 as |
---|
10 | | - * published by the Free Software Foundation. |
---|
11 | | - * |
---|
12 | | - * This program is distributed in the hope that it will be useful, |
---|
13 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
15 | | - * GNU General Public License for more details. |
---|
16 | | - * |
---|
17 | | - * You should have received a copy of the GNU General Public License |
---|
18 | | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
19 | 8 | */ |
---|
20 | 9 | |
---|
21 | 10 | #define pr_fmt(fmt) "hw-breakpoint: " fmt |
---|
.. | .. |
---|
62 | 51 | case TYPE_DATA: |
---|
63 | 52 | return get_num_wrps(); |
---|
64 | 53 | default: |
---|
65 | | - pr_warning("unknown slot type: %d\n", type); |
---|
| 54 | + pr_warn("unknown slot type: %d\n", type); |
---|
66 | 55 | return 0; |
---|
67 | 56 | } |
---|
68 | 57 | } |
---|
.. | .. |
---|
123 | 112 | GEN_READ_WB_REG_CASES(AARCH64_DBG_REG_WVR, AARCH64_DBG_REG_NAME_WVR, val); |
---|
124 | 113 | GEN_READ_WB_REG_CASES(AARCH64_DBG_REG_WCR, AARCH64_DBG_REG_NAME_WCR, val); |
---|
125 | 114 | default: |
---|
126 | | - pr_warning("attempt to read from unknown breakpoint register %d\n", n); |
---|
| 115 | + pr_warn("attempt to read from unknown breakpoint register %d\n", n); |
---|
127 | 116 | } |
---|
128 | 117 | |
---|
129 | 118 | return val; |
---|
.. | .. |
---|
138 | 127 | GEN_WRITE_WB_REG_CASES(AARCH64_DBG_REG_WVR, AARCH64_DBG_REG_NAME_WVR, val); |
---|
139 | 128 | GEN_WRITE_WB_REG_CASES(AARCH64_DBG_REG_WCR, AARCH64_DBG_REG_NAME_WCR, val); |
---|
140 | 129 | default: |
---|
141 | | - pr_warning("attempt to write to unknown breakpoint register %d\n", n); |
---|
| 130 | + pr_warn("attempt to write to unknown breakpoint register %d\n", n); |
---|
142 | 131 | } |
---|
143 | 132 | isb(); |
---|
144 | 133 | } |
---|
.. | .. |
---|
156 | 145 | case AARCH64_BREAKPOINT_EL1: |
---|
157 | 146 | return DBG_ACTIVE_EL1; |
---|
158 | 147 | default: |
---|
159 | | - pr_warning("invalid breakpoint privilege level %d\n", privilege); |
---|
| 148 | + pr_warn("invalid breakpoint privilege level %d\n", privilege); |
---|
160 | 149 | return -EINVAL; |
---|
161 | 150 | } |
---|
162 | 151 | } |
---|
.. | .. |
---|
268 | 257 | * level. |
---|
269 | 258 | */ |
---|
270 | 259 | enable_debug_monitors(dbg_el); |
---|
271 | | - /* Fall through */ |
---|
| 260 | + fallthrough; |
---|
272 | 261 | case HW_BREAKPOINT_RESTORE: |
---|
273 | 262 | /* Setup the address register. */ |
---|
274 | 263 | write_wb_reg(val_reg, i, info->address); |
---|
.. | .. |
---|
551 | 540 | /* Allow halfword watchpoints and breakpoints. */ |
---|
552 | 541 | if (hw->ctrl.len == ARM_BREAKPOINT_LEN_2) |
---|
553 | 542 | break; |
---|
| 543 | + |
---|
| 544 | + fallthrough; |
---|
554 | 545 | case 3: |
---|
555 | 546 | /* Allow single byte watchpoint. */ |
---|
556 | 547 | if (hw->ctrl.len == ARM_BREAKPOINT_LEN_1) |
---|
557 | 548 | break; |
---|
| 549 | + |
---|
| 550 | + fallthrough; |
---|
558 | 551 | default: |
---|
559 | 552 | return -EINVAL; |
---|
560 | 553 | } |
---|
.. | .. |
---|
661 | 654 | perf_bp_event(bp, regs); |
---|
662 | 655 | |
---|
663 | 656 | /* Do we need to handle the stepping? */ |
---|
664 | | - if (is_default_overflow_handler(bp)) |
---|
| 657 | + if (uses_default_overflow_handler(bp)) |
---|
665 | 658 | step = 1; |
---|
666 | 659 | unlock: |
---|
667 | 660 | rcu_read_unlock(); |
---|
.. | .. |
---|
740 | 733 | static int watchpoint_report(struct perf_event *wp, unsigned long addr, |
---|
741 | 734 | struct pt_regs *regs) |
---|
742 | 735 | { |
---|
743 | | - int step = is_default_overflow_handler(wp); |
---|
| 736 | + int step = uses_default_overflow_handler(wp); |
---|
744 | 737 | struct arch_hw_breakpoint *info = counter_arch_bp(wp); |
---|
745 | 738 | |
---|
746 | 739 | info->trigger = addr; |
---|