^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0-only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #ifndef __ASM_EXCEPTION_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #define __ASM_EXCEPTION_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) struct pt_regs;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) struct exception_table_entry;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) extern void ia64_handle_exception(struct pt_regs *regs,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) const struct exception_table_entry *e);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #define ia64_done_with_exception(regs) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) ({ \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) int __ex_ret = 0; \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) const struct exception_table_entry *e; \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) e = search_exception_tables((regs)->cr_iip + ia64_psr(regs)->ri); \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) if (e) { \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) ia64_handle_exception(regs, e); \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) __ex_ret = 1; \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) } \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) __ex_ret; \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) })
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #endif /* __ASM_EXCEPTION_H */