bl_bit_64.h 979 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (C) 2000, 2001 Paolo Alberelli
  3. * Copyright (C) 2003 Paul Mundt
  4. * Copyright (C) 2004 Richard Curnow
  5. *
  6. * This file is subject to the terms and conditions of the GNU General Public
  7. * License. See the file "COPYING" in the main directory of this archive
  8. * for more details.
  9. */
  10. #ifndef __ASM_SH_BL_BIT_64_H
  11. #define __ASM_SH_BL_BIT_64_H
  12. #include <asm/processor.h>
  13. #define SR_BL_LL 0x0000000010000000LL
  14. static inline void set_bl_bit(void)
  15. {
  16. unsigned long long __dummy0, __dummy1 = SR_BL_LL;
  17. __asm__ __volatile__("getcon " __SR ", %0\n\t"
  18. "or %0, %1, %0\n\t"
  19. "putcon %0, " __SR "\n\t"
  20. : "=&r" (__dummy0)
  21. : "r" (__dummy1));
  22. }
  23. static inline void clear_bl_bit(void)
  24. {
  25. unsigned long long __dummy0, __dummy1 = ~SR_BL_LL;
  26. __asm__ __volatile__("getcon " __SR ", %0\n\t"
  27. "and %0, %1, %0\n\t"
  28. "putcon %0, " __SR "\n\t"
  29. : "=&r" (__dummy0)
  30. : "r" (__dummy1));
  31. }
  32. #endif /* __ASM_SH_BL_BIT_64_H */