bug_64.h 725 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef __ASM_X8664_BUG_H
  2. #define __ASM_X8664_BUG_H 1
  3. #ifdef CONFIG_BUG
  4. #define HAVE_ARCH_BUG
  5. #ifdef CONFIG_DEBUG_BUGVERBOSE
  6. #define BUG() \
  7. do { \
  8. asm volatile("1:\tud2\n" \
  9. ".pushsection __bug_table,\"a\"\n" \
  10. "2:\t.quad 1b, %c0\n" \
  11. "\t.word %c1, 0\n" \
  12. "\t.org 2b+%c2\n" \
  13. ".popsection" \
  14. : : "i" (__FILE__), "i" (__LINE__), \
  15. "i" (sizeof(struct bug_entry))); \
  16. for(;;) ; \
  17. } while(0)
  18. #else
  19. #define BUG() \
  20. do { \
  21. asm volatile("ud2"); \
  22. for(;;) ; \
  23. } while(0)
  24. #endif
  25. void out_of_line_bug(void);
  26. #else
  27. static inline void out_of_line_bug(void) { }
  28. #endif
  29. #include <asm-generic/bug.h>
  30. #endif