bug.h 575 B

12345678910111213141516171819202122232425262728
  1. #ifndef _ALPHA_BUG_H
  2. #define _ALPHA_BUG_H
  3. #include <linux/linkage.h>
  4. #ifdef CONFIG_BUG
  5. #include <asm/pal.h>
  6. /* ??? Would be nice to use .gprel32 here, but we can't be sure that the
  7. function loaded the GP, so this could fail in modules. */
  8. static inline void ATTRIB_NORET __BUG(const char *file, int line)
  9. {
  10. __asm__ __volatile__(
  11. "call_pal %0 # bugchk\n\t"
  12. ".long %1\n\t.8byte %2"
  13. : : "i" (PAL_bugchk), "i"(line), "i"(file));
  14. for ( ; ; )
  15. ;
  16. }
  17. #define BUG() __BUG(__FILE__, __LINE__)
  18. #define HAVE_ARCH_BUG
  19. #endif
  20. #include <asm-generic/bug.h>
  21. #endif