bug.h 542 B

1234567891011121314151617181920212223242526
  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_BUG
  10. #define HAVE_ARCH_BUG
  11. #ifdef CONFIG_DEBUG_BUGVERBOSE
  12. #define BUG() \
  13. __asm__ __volatile__( "ud2\n" \
  14. "\t.word %c0\n" \
  15. "\t.long %c1\n" \
  16. : : "i" (__LINE__), "i" (__FILE__))
  17. #else
  18. #define BUG() __asm__ __volatile__("ud2\n")
  19. #endif
  20. #endif
  21. #include <asm-generic/bug.h>
  22. #endif