18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef __ASM_GENERIC_EXTABLE_H
38c2ecf20Sopenharmony_ci#define __ASM_GENERIC_EXTABLE_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci/*
68c2ecf20Sopenharmony_ci * The exception table consists of pairs of addresses: the first is the
78c2ecf20Sopenharmony_ci * address of an instruction that is allowed to fault, and the second is
88c2ecf20Sopenharmony_ci * the address at which the program should continue.  No registers are
98c2ecf20Sopenharmony_ci * modified, so it is entirely up to the continuation code to figure out
108c2ecf20Sopenharmony_ci * what to do.
118c2ecf20Sopenharmony_ci *
128c2ecf20Sopenharmony_ci * All the routines below use bits of fixup code that are out of line
138c2ecf20Sopenharmony_ci * with the main instruction path.  This means when everything is well,
148c2ecf20Sopenharmony_ci * we don't even have to jump over them.  Further, they do not intrude
158c2ecf20Sopenharmony_ci * on our cache or tlb entries.
168c2ecf20Sopenharmony_ci */
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_cistruct exception_table_entry
198c2ecf20Sopenharmony_ci{
208c2ecf20Sopenharmony_ci	unsigned long insn, fixup;
218c2ecf20Sopenharmony_ci};
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_cistruct pt_regs;
258c2ecf20Sopenharmony_ciextern int fixup_exception(struct pt_regs *regs);
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci#endif
28