aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/system_64.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_64.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_64.h')
-rw-r--r--arch/sh/include/asm/system_64.h36
1 files changed, 34 insertions, 2 deletions
diff --git a/arch/sh/include/asm/system_64.h b/arch/sh/include/asm/system_64.h
index 8e4a03e7966c..36338646dfc8 100644
--- a/arch/sh/include/asm/system_64.h
+++ b/arch/sh/include/asm/system_64.h
@@ -12,11 +12,13 @@
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/*
18 * switch_to() should switch tasks to task nr n, first 19 * switch_to() should switch tasks to task nr n, first
19 */ 20 */
21struct thread_struct;
20struct task_struct *sh64_switch_to(struct task_struct *prev, 22struct task_struct *sh64_switch_to(struct task_struct *prev,
21 struct thread_struct *prev_thread, 23 struct thread_struct *prev_thread,
22 struct task_struct *next, 24 struct task_struct *next,
@@ -32,8 +34,6 @@ do { \
32 &next->thread); \ 34 &next->thread); \
33} while (0) 35} while (0)
34 36
35#define __uses_jump_to_uncached
36
37#define jump_to_uncached() do { } while (0) 37#define jump_to_uncached() do { } while (0)
38#define back_to_cached() do { } while (0) 38#define back_to_cached() do { } while (0)
39 39
@@ -47,4 +47,36 @@ static inline reg_size_t register_align(void *val)
47 return (unsigned long long)(signed long long)(signed long)val; 47 return (unsigned long long)(signed long long)(signed long)val;
48} 48}
49 49
50extern void phys_stext(void);
51
52static inline void trigger_address_error(void)
53{
54 phys_stext();
55}
56
57#define SR_BL_LL 0x0000000010000000LL
58
59static inline void set_bl_bit(void)
60{
61 unsigned long long __dummy0, __dummy1 = SR_BL_LL;
62
63 __asm__ __volatile__("getcon " __SR ", %0\n\t"
64 "or %0, %1, %0\n\t"
65 "putcon %0, " __SR "\n\t"
66 : "=&r" (__dummy0)
67 : "r" (__dummy1));
68
69}
70
71static inline void clear_bl_bit(void)
72{
73 unsigned long long __dummy0, __dummy1 = ~SR_BL_LL;
74
75 __asm__ __volatile__("getcon " __SR ", %0\n\t"
76 "and %0, %1, %0\n\t"
77 "putcon %0, " __SR "\n\t"
78 : "=&r" (__dummy0)
79 : "r" (__dummy1));
80}
81
50#endif /* __ASM_SH_SYSTEM_64_H */ 82#endif /* __ASM_SH_SYSTEM_64_H */