18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd. 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci#ifndef __ASM_CSKY_TRAPS_H 58c2ecf20Sopenharmony_ci#define __ASM_CSKY_TRAPS_H 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#define VEC_RESET 0 88c2ecf20Sopenharmony_ci#define VEC_ALIGN 1 98c2ecf20Sopenharmony_ci#define VEC_ACCESS 2 108c2ecf20Sopenharmony_ci#define VEC_ZERODIV 3 118c2ecf20Sopenharmony_ci#define VEC_ILLEGAL 4 128c2ecf20Sopenharmony_ci#define VEC_PRIV 5 138c2ecf20Sopenharmony_ci#define VEC_TRACE 6 148c2ecf20Sopenharmony_ci#define VEC_BREAKPOINT 7 158c2ecf20Sopenharmony_ci#define VEC_UNRECOVER 8 168c2ecf20Sopenharmony_ci#define VEC_SOFTRESET 9 178c2ecf20Sopenharmony_ci#define VEC_AUTOVEC 10 188c2ecf20Sopenharmony_ci#define VEC_FAUTOVEC 11 198c2ecf20Sopenharmony_ci#define VEC_HWACCEL 12 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci#define VEC_TLBMISS 14 228c2ecf20Sopenharmony_ci#define VEC_TLBMODIFIED 15 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci#define VEC_TRAP0 16 258c2ecf20Sopenharmony_ci#define VEC_TRAP1 17 268c2ecf20Sopenharmony_ci#define VEC_TRAP2 18 278c2ecf20Sopenharmony_ci#define VEC_TRAP3 19 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci#define VEC_TLBINVALIDL 20 308c2ecf20Sopenharmony_ci#define VEC_TLBINVALIDS 21 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci#define VEC_PRFL 29 338c2ecf20Sopenharmony_ci#define VEC_FPE 30 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ciextern void *vec_base[]; 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci#define VEC_INIT(i, func) \ 388c2ecf20Sopenharmony_cido { \ 398c2ecf20Sopenharmony_ci vec_base[i] = (void *)func; \ 408c2ecf20Sopenharmony_ci} while (0) 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_civoid csky_alignment(struct pt_regs *regs); 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci#endif /* __ASM_CSKY_TRAPS_H */ 45