diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-10-17 08:06:39 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-10-17 08:06:39 -0400 |
commit | 03fdb708926d5df2d9b9e62222c1666e20caa9e3 (patch) | |
tree | 531492d3aa5fea519f348d128e3405bc96adac51 /arch/sh/include/asm/system_64.h | |
parent | cae19b5902d52ff059f5df98ea993a00e5686af1 (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_64.h')
-rw-r--r-- | arch/sh/include/asm/system_64.h | 26 |
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 @@ | |||
12 | * License. See the file "COPYING" in the main directory of this archive | 12 | * License. See the file "COPYING" in the main directory of this archive |
13 | * for more details. | 13 | * for more details. |
14 | */ | 14 | */ |
15 | #include <cpu/registers.h> | ||
15 | #include <asm/processor.h> | 16 | #include <asm/processor.h> |
16 | 17 | ||
17 | /* | 18 | /* |
@@ -47,4 +48,29 @@ static inline reg_size_t register_align(void *val) | |||
47 | return (unsigned long long)(signed long long)(signed long)val; | 48 | return (unsigned long long)(signed long long)(signed long)val; |
48 | } | 49 | } |
49 | 50 | ||
51 | #define SR_BL_LL 0x0000000010000000LL | ||
52 | |||
53 | static inline void set_bl_bit(void) | ||
54 | { | ||
55 | unsigned long long __dummy0, __dummy1 = SR_BL_LL; | ||
56 | |||
57 | __asm__ __volatile__("getcon " __SR ", %0\n\t" | ||
58 | "or %0, %1, %0\n\t" | ||
59 | "putcon %0, " __SR "\n\t" | ||
60 | : "=&r" (__dummy0) | ||
61 | : "r" (__dummy1)); | ||
62 | |||
63 | } | ||
64 | |||
65 | static inline void clear_bl_bit(void) | ||
66 | { | ||
67 | unsigned long long __dummy0, __dummy1 = ~SR_BL_LL; | ||
68 | |||
69 | __asm__ __volatile__("getcon " __SR ", %0\n\t" | ||
70 | "and %0, %1, %0\n\t" | ||
71 | "putcon %0, " __SR "\n\t" | ||
72 | : "=&r" (__dummy0) | ||
73 | : "r" (__dummy1)); | ||
74 | } | ||
75 | |||
50 | #endif /* __ASM_SH_SYSTEM_64_H */ | 76 | #endif /* __ASM_SH_SYSTEM_64_H */ |