diff options
author | David Howells <dhowells@redhat.com> | 2012-03-28 21:30:03 +0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2012-03-28 21:30:03 +0400 |
commit | e839ca528718e68cad32a307dc9aabf01ef3eb05 (patch) | |
tree | 5ceb6ece0688455f7205739b71e4b6e04afd2988 /arch/sh/include/asm/bl_bit_32.h | |
parent | 4eb14db4440febb7e560eb8ab2c099bc6e11a0ac (diff) | |
download | linux-e839ca528718e68cad32a307dc9aabf01ef3eb05.tar.xz |
Disintegrate asm/system.h for SH
Disintegrate asm/system.h for SH.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-sh@vger.kernel.org
Diffstat (limited to 'arch/sh/include/asm/bl_bit_32.h')
-rw-r--r-- | arch/sh/include/asm/bl_bit_32.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/sh/include/asm/bl_bit_32.h b/arch/sh/include/asm/bl_bit_32.h new file mode 100644 index 000000000000..fd21eee62149 --- /dev/null +++ b/arch/sh/include/asm/bl_bit_32.h @@ -0,0 +1,33 @@ +#ifndef __ASM_SH_BL_BIT_32_H +#define __ASM_SH_BL_BIT_32_H + +static inline void set_bl_bit(void) +{ + unsigned long __dummy0, __dummy1; + + __asm__ __volatile__ ( + "stc sr, %0\n\t" + "or %2, %0\n\t" + "and %3, %0\n\t" + "ldc %0, sr\n\t" + : "=&r" (__dummy0), "=r" (__dummy1) + : "r" (0x10000000), "r" (0xffffff0f) + : "memory" + ); +} + +static inline void clear_bl_bit(void) +{ + unsigned long __dummy0, __dummy1; + + __asm__ __volatile__ ( + "stc sr, %0\n\t" + "and %2, %0\n\t" + "ldc %0, sr\n\t" + : "=&r" (__dummy0), "=r" (__dummy1) + : "1" (~0x10000000) + : "memory" + ); +} + +#endif /* __ASM_SH_BL_BIT_32_H */ |