1
2 #ifndef _ASM_X86_EXTABLE_H
3 #define _ASM_X86_EXTABLE_H
4
5
6
7
8
9
10
11
12
13
14
15
16
17 struct exception_table_entry {
18 int insn, fixup, handler;
19 };
20 struct pt_regs;
21
22 #define ARCH_HAS_RELATIVE_EXTABLE
23
24 #define swap_ex_entry_fixup(a, b, tmp, delta) \
25 do { \
26 (a)->fixup = (b)->fixup + (delta); \
27 (b)->fixup = (tmp).fixup - (delta); \
28 (a)->handler = (b)->handler + (delta); \
29 (b)->handler = (tmp).handler - (delta); \
30 } while (0)
31
32 extern int fixup_exception(struct pt_regs *regs, int trapnr,
33 unsigned long error_code, unsigned long fault_addr);
34 extern int fixup_bug(struct pt_regs *regs, int trapnr);
35 extern bool ex_has_fault_handler(unsigned long ip);
36 extern void early_fixup_exception(struct pt_regs *regs, int trapnr);
37
38 #endif