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