traps_64.h 851 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (C) 2000, 2001 Paolo Alberelli
  3. * Copyright (C) 2003 Paul Mundt
  4. * Copyright (C) 2004 Richard Curnow
  5. *
  6. * This file is subject to the terms and conditions of the GNU General Public
  7. * License. See the file "COPYING" in the main directory of this archive
  8. * for more details.
  9. */
  10. #ifndef __ASM_SH_TRAPS_64_H
  11. #define __ASM_SH_TRAPS_64_H
  12. #include <cpu/registers.h>
  13. extern void phys_stext(void);
  14. #define lookup_exception_vector() \
  15. ({ \
  16. unsigned long _vec; \
  17. \
  18. __asm__ __volatile__ ( \
  19. "getcon " __EXPEVT ", %0\n\t" \
  20. : "=r" (_vec) \
  21. ); \
  22. \
  23. _vec; \
  24. })
  25. static inline void trigger_address_error(void)
  26. {
  27. phys_stext();
  28. }
  29. #define BUILD_TRAP_HANDLER(name) \
  30. asmlinkage void name##_trap_handler(unsigned int vec, struct pt_regs *regs)
  31. #define TRAP_HANDLER_DECL
  32. #endif /* __ASM_SH_TRAPS_64_H */