1 /* SPDX-License-Identifier: GPL-2.0 */ 2 3 #ifndef __ASM_CSKY_TRAPS_H 4 #define __ASM_CSKY_TRAPS_H 5 6 #define VEC_RESET 0 7 #define VEC_ALIGN 1 8 #define VEC_ACCESS 2 9 #define VEC_ZERODIV 3 10 #define VEC_ILLEGAL 4 11 #define VEC_PRIV 5 12 #define VEC_TRACE 6 13 #define VEC_BREAKPOINT 7 14 #define VEC_UNRECOVER 8 15 #define VEC_SOFTRESET 9 16 #define VEC_AUTOVEC 10 17 #define VEC_FAUTOVEC 11 18 #define VEC_HWACCEL 12 19 20 #define VEC_TLBMISS 14 21 #define VEC_TLBMODIFIED 15 22 23 #define VEC_TRAP0 16 24 #define VEC_TRAP1 17 25 #define VEC_TRAP2 18 26 #define VEC_TRAP3 19 27 28 #define VEC_TLBINVALIDL 20 29 #define VEC_TLBINVALIDS 21 30 31 #define VEC_PRFL 29 32 #define VEC_FPE 30 33 34 extern void *vec_base[]; 35 36 #define VEC_INIT(i, func) \ 37 do { \ 38 vec_base[i] = (void *)func; \ 39 } while (0) 40 41 void csky_alignment(struct pt_regs *regs); 42 43 asmlinkage void do_trap_unknown(struct pt_regs *regs); 44 asmlinkage void do_trap_zdiv(struct pt_regs *regs); 45 asmlinkage void do_trap_buserr(struct pt_regs *regs); 46 asmlinkage void do_trap_misaligned(struct pt_regs *regs); 47 asmlinkage void do_trap_bkpt(struct pt_regs *regs); 48 asmlinkage void do_trap_illinsn(struct pt_regs *regs); 49 asmlinkage void do_trap_fpe(struct pt_regs *regs); 50 asmlinkage void do_trap_priv(struct pt_regs *regs); 51 asmlinkage void trap_c(struct pt_regs *regs); 52 53 asmlinkage void do_notify_resume(struct pt_regs *regs, 54 unsigned long thread_info_flags); 55 56 void trap_init(void); 57 58 #endif /* __ASM_CSKY_TRAPS_H */ 59