18c2ecf20Sopenharmony_ci#ifndef __ASM_EXTABLE_H 28c2ecf20Sopenharmony_ci#define __ASM_EXTABLE_H 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci#ifndef __ASSEMBLY__ 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci/* 78c2ecf20Sopenharmony_ci * The exception table consists of pairs of relative offsets: the first 88c2ecf20Sopenharmony_ci * is the relative offset to an instruction that is allowed to fault, 98c2ecf20Sopenharmony_ci * and the second is the relative offset at which the program should 108c2ecf20Sopenharmony_ci * continue. No registers are modified, so it is entirely up to the 118c2ecf20Sopenharmony_ci * continuation code to figure out what to do. 128c2ecf20Sopenharmony_ci */ 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_cistruct exception_table_entry { 158c2ecf20Sopenharmony_ci int insn, fixup; 168c2ecf20Sopenharmony_ci}; 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci#define ARCH_HAS_RELATIVE_EXTABLE 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ciextern int fixup_exception(struct pt_regs *regs); 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci /* 238c2ecf20Sopenharmony_ci * ex_entry - place-relative extable entry 248c2ecf20Sopenharmony_ci */ 258c2ecf20Sopenharmony_ciasm( ".macro ex_entry, insn, fixup \n" 268c2ecf20Sopenharmony_ci ".pushsection __ex_table, \"a\", %progbits \n" 278c2ecf20Sopenharmony_ci ".align 3 \n" 288c2ecf20Sopenharmony_ci ".long \\insn - . \n" 298c2ecf20Sopenharmony_ci ".long \\fixup - . \n" 308c2ecf20Sopenharmony_ci ".popsection \n" 318c2ecf20Sopenharmony_ci ".endm \n"); 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci#else 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci /* 368c2ecf20Sopenharmony_ci * ex_entry - place-relative extable entry 378c2ecf20Sopenharmony_ci */ 388c2ecf20Sopenharmony_ci .macro ex_entry, insn, fixup 398c2ecf20Sopenharmony_ci .pushsection __ex_table, "a", %progbits 408c2ecf20Sopenharmony_ci .align 3 418c2ecf20Sopenharmony_ci .long \insn - . 428c2ecf20Sopenharmony_ci .long \fixup - . 438c2ecf20Sopenharmony_ci .popsection 448c2ecf20Sopenharmony_ci .endm 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci#endif 478c2ecf20Sopenharmony_ci#endif 48