aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/system_32.h
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /arch/sh/include/asm/system_32.h
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'arch/sh/include/asm/system_32.h')
-rw-r--r--arch/sh/include/asm/system_32.h44
1 files changed, 41 insertions, 3 deletions
diff --git a/arch/sh/include/asm/system_32.h b/arch/sh/include/asm/system_32.h
index 607d413f6168..51296b36770e 100644
--- a/arch/sh/include/asm/system_32.h
+++ b/arch/sh/include/asm/system_32.h
@@ -2,6 +2,7 @@
2#define __ASM_SH_SYSTEM_32_H 2#define __ASM_SH_SYSTEM_32_H
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5#include <asm/mmu.h>
5 6
6#ifdef CONFIG_SH_DSP 7#ifdef CONFIG_SH_DSP
7 8
@@ -144,9 +145,6 @@ do { \
144 __restore_dsp(prev); \ 145 __restore_dsp(prev); \
145} while (0) 146} while (0)
146 147
147#define __uses_jump_to_uncached \
148 noinline __attribute__ ((__section__ (".uncached.text")))
149
150/* 148/*
151 * Jump to uncached area. 149 * Jump to uncached area.
152 * When handling TLB or caches, we need to do it from an uncached area. 150 * When handling TLB or caches, we need to do it from an uncached area.
@@ -216,6 +214,17 @@ static inline reg_size_t register_align(void *val)
216int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs, 214int handle_unaligned_access(insn_size_t instruction, struct pt_regs *regs,
217 struct mem_access *ma, int); 215 struct mem_access *ma, int);
218 216
217static inline void trigger_address_error(void)
218{
219 if (__in_29bit_mode())
220 __asm__ __volatile__ (
221 "ldc %0, sr\n\t"
222 "mov.l @%1, %0"
223 :
224 : "r" (0x10000000), "r" (0x80000001)
225 );
226}
227
219asmlinkage void do_address_error(struct pt_regs *regs, 228asmlinkage void do_address_error(struct pt_regs *regs,
220 unsigned long writeaccess, 229 unsigned long writeaccess,
221 unsigned long address); 230 unsigned long address);
@@ -232,4 +241,33 @@ asmlinkage void do_exception_error(unsigned long r4, unsigned long r5,
232 unsigned long r6, unsigned long r7, 241 unsigned long r6, unsigned long r7,
233 struct pt_regs __regs); 242 struct pt_regs __regs);
234 243
244static inline void set_bl_bit(void)
245{
246 unsigned long __dummy0, __dummy1;
247
248 __asm__ __volatile__ (
249 "stc sr, %0\n\t"
250 "or %2, %0\n\t"
251 "and %3, %0\n\t"
252 "ldc %0, sr\n\t"
253 : "=&r" (__dummy0), "=r" (__dummy1)
254 : "r" (0x10000000), "r" (0xffffff0f)
255 : "memory"
256 );
257}
258
259static inline void clear_bl_bit(void)
260{
261 unsigned long __dummy0, __dummy1;
262
263 __asm__ __volatile__ (
264 "stc sr, %0\n\t"
265 "and %2, %0\n\t"
266 "ldc %0, sr\n\t"
267 : "=&r" (__dummy0), "=r" (__dummy1)
268 : "1" (~0x10000000)
269 : "memory"
270 );
271}
272
235#endif /* __ASM_SH_SYSTEM_32_H */ 273#endif /* __ASM_SH_SYSTEM_32_H */