.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Based on arch/arm/include/asm/traps.h |
---|
3 | 4 | * |
---|
4 | 5 | * 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/>. |
---|
17 | 6 | */ |
---|
18 | 7 | #ifndef __ASM_TRAP_H |
---|
19 | 8 | #define __ASM_TRAP_H |
---|
.. | .. |
---|
35 | 24 | |
---|
36 | 25 | void register_undef_hook(struct undef_hook *hook); |
---|
37 | 26 | 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); |
---|
39 | 28 | 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); |
---|
42 | 32 | |
---|
43 | 33 | /* |
---|
44 | 34 | * Move regs->pc to next instruction and do necessary setup before it |
---|
.. | .. |
---|
50 | 40 | { |
---|
51 | 41 | return ptr >= (unsigned long)&__irqentry_text_start && |
---|
52 | 42 | 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); |
---|
63 | 43 | } |
---|
64 | 44 | |
---|
65 | 45 | static inline int in_entry_text(unsigned long ptr) |
---|
.. | .. |
---|
120 | 100 | |
---|
121 | 101 | bool arm64_is_fatal_ras_serror(struct pt_regs *regs, unsigned int esr); |
---|
122 | 102 | 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 | | - |
---|
131 | 103 | #endif |
---|