]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
1da177e4 LT |
2 | #ifndef _ASMARM_TRAP_H |
3 | #define _ASMARM_TRAP_H | |
4 | ||
5 | #include <linux/list.h> | |
6 | ||
e7d59db9 MP |
7 | struct pt_regs; |
8 | struct task_struct; | |
9 | ||
1da177e4 LT |
10 | struct undef_hook { |
11 | struct list_head node; | |
12 | u32 instr_mask; | |
13 | u32 instr_val; | |
14 | u32 cpsr_mask; | |
15 | u32 cpsr_val; | |
16 | int (*fn)(struct pt_regs *regs, unsigned int instr); | |
17 | }; | |
18 | ||
19 | void register_undef_hook(struct undef_hook *hook); | |
20 | void unregister_undef_hook(struct undef_hook *hook); | |
21 | ||
61b5cb1c RV |
22 | static inline int __in_irqentry_text(unsigned long ptr) |
23 | { | |
24 | extern char __irqentry_text_start[]; | |
25 | extern char __irqentry_text_end[]; | |
26 | ||
27 | return ptr >= (unsigned long)&__irqentry_text_start && | |
28 | ptr < (unsigned long)&__irqentry_text_end; | |
29 | } | |
61b5cb1c | 30 | |
785d3cd2 NP |
31 | static inline int in_exception_text(unsigned long ptr) |
32 | { | |
33 | extern char __exception_text_start[]; | |
34 | extern char __exception_text_end[]; | |
61b5cb1c RV |
35 | int in; |
36 | ||
37 | in = ptr >= (unsigned long)&__exception_text_start && | |
38 | ptr < (unsigned long)&__exception_text_end; | |
785d3cd2 | 39 | |
61b5cb1c | 40 | return in ? : __in_irqentry_text(ptr); |
785d3cd2 NP |
41 | } |
42 | ||
94e5a85b | 43 | extern void __init early_trap_init(void *); |
67a94c23 | 44 | extern void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long frame); |
425fc47a | 45 | extern void ptrace_break(struct task_struct *tsk, struct pt_regs *regs); |
5cbad0eb | 46 | |
247055aa CM |
47 | extern void *vectors_page; |
48 | ||
1da177e4 | 49 | #endif |