bug.h 518 B

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