bug.h 516 B

12345678910111213141516171819202122232425
  1. #ifndef _I386_BUG_H
  2. #define _I386_BUG_H
  3. /*
  4. * Tell the user there is some problem.
  5. * The offending file and line are encoded after the "officially
  6. * undefined" opcode for parsing in the trap handler.
  7. */
  8. #ifdef CONFIG_BUG
  9. #define HAVE_ARCH_BUG
  10. #ifdef CONFIG_DEBUG_BUGVERBOSE
  11. #define BUG() \
  12. __asm__ __volatile__( "ud2\n" \
  13. "\t.word %c0\n" \
  14. "\t.long %c1\n" \
  15. : : "i" (__LINE__), "i" (__FILE__))
  16. #else
  17. #define BUG() __asm__ __volatile__("ud2\n")
  18. #endif
  19. #endif
  20. #include <asm-generic/bug.h>
  21. #endif