aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/include/asm/system_32.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-10-17 21:06:39 +0900
committerPaul Mundt <lethal@linux-sh.org>2009-10-17 21:06:39 +0900
commit03fdb708926d5df2d9b9e62222c1666e20caa9e3 (patch)
tree531492d3aa5fea519f348d128e3405bc96adac51 /arch/sh/include/asm/system_32.h
parentcae19b5902d52ff059f5df98ea993a00e5686af1 (diff)
sh: Convert to asm-generic/irqflags.h.
This simplifies the irqflags support by switching over to the asm-generic version. The necessary support functions are brought out-of-line for both SHcompact and SHmedia instruction sets. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/system_32.h')
-rw-r--r--arch/sh/include/asm/system_32.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/sh/include/asm/system_32.h b/arch/sh/include/asm/system_32.h
index 607d413f616..06814f5b59c 100644
--- a/arch/sh/include/asm/system_32.h
+++ b/arch/sh/include/asm/system_32.h
@@ -232,4 +232,33 @@ asmlinkage void do_exception_error(unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7,
struct pt_regs __regs);
+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_SYSTEM_32_H */