traps.h 855 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
  3. #ifndef __ASM_CSKY_TRAPS_H
  4. #define __ASM_CSKY_TRAPS_H
  5. #define VEC_RESET 0
  6. #define VEC_ALIGN 1
  7. #define VEC_ACCESS 2
  8. #define VEC_ZERODIV 3
  9. #define VEC_ILLEGAL 4
  10. #define VEC_PRIV 5
  11. #define VEC_TRACE 6
  12. #define VEC_BREAKPOINT 7
  13. #define VEC_UNRECOVER 8
  14. #define VEC_SOFTRESET 9
  15. #define VEC_AUTOVEC 10
  16. #define VEC_FAUTOVEC 11
  17. #define VEC_HWACCEL 12
  18. #define VEC_TLBMISS 14
  19. #define VEC_TLBMODIFIED 15
  20. #define VEC_TRAP0 16
  21. #define VEC_TRAP1 17
  22. #define VEC_TRAP2 18
  23. #define VEC_TRAP3 19
  24. #define VEC_TLBINVALIDL 20
  25. #define VEC_TLBINVALIDS 21
  26. #define VEC_PRFL 29
  27. #define VEC_FPE 30
  28. extern void *vec_base[];
  29. #define VEC_INIT(i, func) \
  30. do { \
  31. vec_base[i] = (void *)func; \
  32. } while (0)
  33. void csky_alignment(struct pt_regs *regs);
  34. #endif /* __ASM_CSKY_TRAPS_H */