aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh/system.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-09-27 03:01:12 -0400
committerPaul Mundt <lethal@linux-sh.org>2006-09-27 03:01:12 -0400
commitf1517494407b1f1ca0063a756cc30d75e96d433c (patch)
treefe7827210e76750687de601e6b0695a4e4e16fa7 /include/asm-sh/system.h
parent5283ecb5ccbdb90d49fce6488d3944bba63a591c (diff)
sh: Cleanup and document register bank usage.
Initial register bank cleanup. Make SR.RB configurable, and add some preliminary documentation on register bank usage within the kernel. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/system.h')
-rw-r--r--include/asm-sh/system.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/asm-sh/system.h b/include/asm-sh/system.h
index 1630a5411e5f..198d17e3069a 100644
--- a/include/asm-sh/system.h
+++ b/include/asm-sh/system.h
@@ -136,7 +136,8 @@ extern void __xchg_called_with_bad_pointer(void);
136#define set_mb(var, value) do { xchg(&var, value); } while (0) 136#define set_mb(var, value) do { xchg(&var, value); } while (0)
137 137
138/* Interrupt Control */ 138/* Interrupt Control */
139static __inline__ void local_irq_enable(void) 139#ifdef CONFIG_CPU_HAS_SR_RB
140static inline void local_irq_enable(void)
140{ 141{
141 unsigned long __dummy0, __dummy1; 142 unsigned long __dummy0, __dummy1;
142 143
@@ -149,6 +150,20 @@ static __inline__ void local_irq_enable(void)
149 : "1" (~0x000000f0) 150 : "1" (~0x000000f0)
150 : "memory"); 151 : "memory");
151} 152}
153#else
154static inline void local_irq_enable(void)
155{
156 unsigned long __dummy0, __dummy1;
157
158 __asm__ __volatile__ (
159 "stc sr, %0\n\t"
160 "and %1, %0\n\t"
161 "ldc %0, sr\n\t"
162 : "=&r" (__dummy0), "=r" (__dummy1)
163 : "1" (~0x000000f0)
164 : "memory");
165}
166#endif
152 167
153static __inline__ void local_irq_disable(void) 168static __inline__ void local_irq_disable(void)
154{ 169{