forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 61598093bbdd283a7edc367d900f223070ead8d2
kernel/arch/arm64/include/asm/traps.h
....@@ -1,19 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Based on arch/arm/include/asm/traps.h
34 *
45 * Copyright (C) 2012 ARM Ltd.
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
176 */
187 #ifndef __ASM_TRAP_H
198 #define __ASM_TRAP_H
....@@ -35,10 +24,11 @@
3524
3625 void register_undef_hook(struct undef_hook *hook);
3726 void unregister_undef_hook(struct undef_hook *hook);
38
-void force_signal_inject(int signal, int code, unsigned long address);
27
+void force_signal_inject(int signal, int code, unsigned long address, unsigned int err);
3928 void arm64_notify_segfault(unsigned long addr);
40
-void arm64_force_sig_info(struct siginfo *info, const char *str,
41
- struct task_struct *tsk);
29
+void arm64_force_sig_fault(int signo, int code, unsigned long far, const char *str);
30
+void arm64_force_sig_mceerr(int code, unsigned long far, short lsb, const char *str);
31
+void arm64_force_sig_ptrace_errno_trap(int errno, unsigned long far, const char *str);
4232
4333 /*
4434 * Move regs->pc to next instruction and do necessary setup before it
....@@ -50,16 +40,6 @@
5040 {
5141 return ptr >= (unsigned long)&__irqentry_text_start &&
5242 ptr < (unsigned long)&__irqentry_text_end;
53
-}
54
-
55
-static inline int in_exception_text(unsigned long ptr)
56
-{
57
- int in;
58
-
59
- in = ptr >= (unsigned long)&__exception_text_start &&
60
- ptr < (unsigned long)&__exception_text_end;
61
-
62
- return in ? : __in_irqentry_text(ptr);
6343 }
6444
6545 static inline int in_entry_text(unsigned long ptr)
....@@ -120,12 +100,4 @@
120100
121101 bool arm64_is_fatal_ras_serror(struct pt_regs *regs, unsigned int esr);
122102 void __noreturn arm64_serror_panic(struct pt_regs *regs, u32 esr);
123
-
124
-extern int (*do_tlb_conf_fault_cb)(unsigned long addr,
125
- unsigned int esr,
126
- struct pt_regs *regs);
127
-extern int do_tlb_conf_fault(unsigned long addr,
128
- unsigned int esr,
129
- struct pt_regs *regs);
130
-
131103 #endif