summaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/system_64.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_64.h
parentcae19b5902d52ff059f5df98ea993a00e5686af1 (diff)
downloadtalos-op-linux-03fdb708926d5df2d9b9e62222c1666e20caa9e3.tar.gz
talos-op-linux-03fdb708926d5df2d9b9e62222c1666e20caa9e3.zip
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_64.h')
-rw-r--r--arch/sh/include/asm/system_64.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/sh/include/asm/system_64.h b/arch/sh/include/asm/system_64.h
index 8e4a03e7966c..ab1dd917ea87 100644
--- a/arch/sh/include/asm/system_64.h
+++ b/arch/sh/include/asm/system_64.h
@@ -12,6 +12,7 @@
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*/
+#include <cpu/registers.h>
#include <asm/processor.h>
/*
@@ -47,4 +48,29 @@ static inline reg_size_t register_align(void *val)
return (unsigned long long)(signed long long)(signed long)val;
}
+#define SR_BL_LL 0x0000000010000000LL
+
+static inline void set_bl_bit(void)
+{
+ unsigned long long __dummy0, __dummy1 = SR_BL_LL;
+
+ __asm__ __volatile__("getcon " __SR ", %0\n\t"
+ "or %0, %1, %0\n\t"
+ "putcon %0, " __SR "\n\t"
+ : "=&r" (__dummy0)
+ : "r" (__dummy1));
+
+}
+
+static inline void clear_bl_bit(void)
+{
+ unsigned long long __dummy0, __dummy1 = ~SR_BL_LL;
+
+ __asm__ __volatile__("getcon " __SR ", %0\n\t"
+ "and %0, %1, %0\n\t"
+ "putcon %0, " __SR "\n\t"
+ : "=&r" (__dummy0)
+ : "r" (__dummy1));
+}
+
#endif /* __ASM_SH_SYSTEM_64_H */
OpenPOWER on IntegriCloud