hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/arch/arm/probes/decode.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * arch/arm/probes/decode.h
34 *
....@@ -5,15 +6,6 @@
56 *
67 * Some contents moved here from arch/arm/include/asm/kprobes.h which is
78 * Copyright (C) 2006, 2007 Motorola Inc.
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License version 2 as
11
- * published by the Free Software Foundation.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
- * General Public License for more details.
179 */
1810
1911 #ifndef _ARM_KERNEL_PROBES_H
....@@ -22,6 +14,7 @@
2214 #include <linux/types.h>
2315 #include <linux/stddef.h>
2416 #include <asm/probes.h>
17
+#include <asm/ptrace.h>
2518 #include <asm/kprobes.h>
2619
2720 void __init arm_probes_decode_init(void);
....@@ -42,31 +35,6 @@
4235
4336 #endif
4437
45
-
46
-/*
47
- * Update ITSTATE after normal execution of an IT block instruction.
48
- *
49
- * The 8 IT state bits are split into two parts in CPSR:
50
- * ITSTATE<1:0> are in CPSR<26:25>
51
- * ITSTATE<7:2> are in CPSR<15:10>
52
- */
53
-static inline unsigned long it_advance(unsigned long cpsr)
54
- {
55
- if ((cpsr & 0x06000400) == 0) {
56
- /* ITSTATE<2:0> == 0 means end of IT block, so clear IT state */
57
- cpsr &= ~PSR_IT_MASK;
58
- } else {
59
- /* We need to shift left ITSTATE<4:0> */
60
- const unsigned long mask = 0x06001c00; /* Mask ITSTATE<4:0> */
61
- unsigned long it = cpsr & mask;
62
- it <<= 1;
63
- it |= it >> (27 - 10); /* Carry ITSTATE<2> to correct place */
64
- it &= mask;
65
- cpsr &= ~mask;
66
- cpsr |= it;
67
- }
68
- return cpsr;
69
-}
7038
7139 static inline void __kprobes bx_write_pc(long pcv, struct pt_regs *regs)
7240 {