.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | | - * This program is free software; you can redistribute it and/or modify |
---|
3 | | - * it under the terms of the GNU General Public License version 2 as |
---|
4 | | - * published by the Free Software Foundation. |
---|
5 | | - * |
---|
6 | | - * This program is distributed in the hope that it will be useful, |
---|
7 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
8 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
9 | | - * GNU General Public License for more details. |
---|
10 | | - * |
---|
11 | | - * You should have received a copy of the GNU General Public License |
---|
12 | | - * along with this program; if not, write to the Free Software |
---|
13 | | - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
14 | 3 | * |
---|
15 | 4 | * Copyright (C) 2009, 2010 ARM Limited |
---|
16 | 5 | * |
---|
.. | .. |
---|
257 | 246 | case ARM_DEBUG_ARCH_V7_ECP14: |
---|
258 | 247 | case ARM_DEBUG_ARCH_V7_1: |
---|
259 | 248 | case ARM_DEBUG_ARCH_V8: |
---|
| 249 | + case ARM_DEBUG_ARCH_V8_1: |
---|
| 250 | + case ARM_DEBUG_ARCH_V8_2: |
---|
| 251 | + case ARM_DEBUG_ARCH_V8_4: |
---|
260 | 252 | ARM_DBG_WRITE(c0, c2, 2, (dscr | ARM_DSCR_MDBGEN)); |
---|
261 | 253 | isb(); |
---|
262 | 254 | break; |
---|
.. | .. |
---|
555 | 547 | if ((hw->ctrl.type != ARM_BREAKPOINT_EXECUTE) |
---|
556 | 548 | && max_watchpoint_len >= 8) |
---|
557 | 549 | break; |
---|
| 550 | + fallthrough; |
---|
558 | 551 | default: |
---|
559 | 552 | return -EINVAL; |
---|
560 | 553 | } |
---|
.. | .. |
---|
619 | 612 | /* Allow halfword watchpoints and breakpoints. */ |
---|
620 | 613 | if (hw->ctrl.len == ARM_BREAKPOINT_LEN_2) |
---|
621 | 614 | break; |
---|
| 615 | + fallthrough; |
---|
622 | 616 | case 3: |
---|
623 | 617 | /* Allow single byte watchpoint. */ |
---|
624 | 618 | if (hw->ctrl.len == ARM_BREAKPOINT_LEN_1) |
---|
625 | 619 | break; |
---|
| 620 | + fallthrough; |
---|
626 | 621 | default: |
---|
627 | 622 | ret = -EINVAL; |
---|
628 | 623 | goto out; |
---|
.. | .. |
---|
631 | 626 | hw->address &= ~alignment_mask; |
---|
632 | 627 | hw->ctrl.len <<= offset; |
---|
633 | 628 | |
---|
634 | | - if (is_default_overflow_handler(bp)) { |
---|
| 629 | + if (uses_default_overflow_handler(bp)) { |
---|
635 | 630 | /* |
---|
636 | 631 | * Mismatch breakpoints are required for single-stepping |
---|
637 | 632 | * breakpoints. |
---|
.. | .. |
---|
803 | 798 | * Otherwise, insert a temporary mismatch breakpoint so that |
---|
804 | 799 | * we can single-step over the watchpoint trigger. |
---|
805 | 800 | */ |
---|
806 | | - if (!is_default_overflow_handler(wp)) |
---|
| 801 | + if (!uses_default_overflow_handler(wp)) |
---|
807 | 802 | continue; |
---|
808 | 803 | step: |
---|
809 | 804 | enable_single_step(wp, instruction_pointer(regs)); |
---|
.. | .. |
---|
816 | 811 | info->trigger = addr; |
---|
817 | 812 | pr_debug("watchpoint fired: address = 0x%x\n", info->trigger); |
---|
818 | 813 | perf_bp_event(wp, regs); |
---|
819 | | - if (is_default_overflow_handler(wp)) |
---|
| 814 | + if (uses_default_overflow_handler(wp)) |
---|
820 | 815 | enable_single_step(wp, instruction_pointer(regs)); |
---|
821 | 816 | } |
---|
822 | 817 | |
---|
.. | .. |
---|
891 | 886 | info->trigger = addr; |
---|
892 | 887 | pr_debug("breakpoint fired: address = 0x%x\n", addr); |
---|
893 | 888 | perf_bp_event(bp, regs); |
---|
894 | | - if (is_default_overflow_handler(bp)) |
---|
| 889 | + if (uses_default_overflow_handler(bp)) |
---|
895 | 890 | enable_single_step(bp, addr); |
---|
896 | 891 | goto unlock; |
---|
897 | 892 | } |
---|
.. | .. |
---|
933 | 928 | break; |
---|
934 | 929 | case ARM_ENTRY_ASYNC_WATCHPOINT: |
---|
935 | 930 | WARN(1, "Asynchronous watchpoint exception taken. Debugging results may be unreliable\n"); |
---|
| 931 | + fallthrough; |
---|
936 | 932 | case ARM_ENTRY_SYNC_WATCHPOINT: |
---|
937 | 933 | watchpoint_handler(addr, fsr, regs); |
---|
938 | 934 | break; |
---|
.. | .. |
---|
981 | 977 | ARM_DBG_READ(c1, c1, 4, oslsr); |
---|
982 | 978 | if (oslsr & ARM_OSLSR_OSLM0) |
---|
983 | 979 | return true; |
---|
| 980 | + fallthrough; |
---|
984 | 981 | default: |
---|
985 | 982 | return false; |
---|
986 | 983 | } |
---|