bug.h 456 B

123456789101112131415161718192021222324252627
  1. #ifndef _S390_BUG_H
  2. #define _S390_BUG_H
  3. #include <linux/kernel.h>
  4. #ifdef CONFIG_BUG
  5. static inline __attribute__((noreturn)) void __do_illegal_op(void)
  6. {
  7. #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
  8. __builtin_trap();
  9. #else
  10. asm volatile(".long 0");
  11. #endif
  12. }
  13. #define BUG() do { \
  14. printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
  15. __do_illegal_op(); \
  16. } while (0)
  17. #define HAVE_ARCH_BUG
  18. #endif
  19. #include <asm-generic/bug.h>
  20. #endif