aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/system.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-arm/system.h')
-rw-r--r--include/asm-arm/system.h33
1 files changed, 8 insertions, 25 deletions
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
index e160aeb0138d..aa223fc546af 100644
--- a/include/asm-arm/system.h
+++ b/include/asm-arm/system.h
@@ -73,6 +73,7 @@
73#ifndef __ASSEMBLY__ 73#ifndef __ASSEMBLY__
74 74
75#include <linux/linkage.h> 75#include <linux/linkage.h>
76#include <linux/irqflags.h>
76 77
77struct thread_info; 78struct thread_info;
78struct task_struct; 79struct task_struct;
@@ -139,6 +140,9 @@ static inline int cpu_is_xsc3(void)
139#define cpu_is_xscale() 1 140#define cpu_is_xscale() 1
140#endif 141#endif
141 142
143extern unsigned long cr_no_alignment; /* defined in entry-armv.S */
144extern unsigned long cr_alignment; /* defined in entry-armv.S */
145
142static inline unsigned int get_cr(void) 146static inline unsigned int get_cr(void)
143{ 147{
144 unsigned int val; 148 unsigned int val;
@@ -152,6 +156,10 @@ static inline void set_cr(unsigned int val)
152 : : "r" (val) : "cc"); 156 : : "r" (val) : "cc");
153} 157}
154 158
159#ifndef CONFIG_SMP
160extern void adjust_cr(unsigned long mask, unsigned long set);
161#endif
162
155#define CPACC_FULL(n) (3 << (n * 2)) 163#define CPACC_FULL(n) (3 << (n * 2))
156#define CPACC_SVC(n) (1 << (n * 2)) 164#define CPACC_SVC(n) (1 << (n * 2))
157#define CPACC_DISABLE(n) (0 << (n * 2)) 165#define CPACC_DISABLE(n) (0 << (n * 2))
@@ -170,29 +178,6 @@ static inline void set_copro_access(unsigned int val)
170 : : "r" (val) : "cc"); 178 : : "r" (val) : "cc");
171} 179}
172 180
173extern unsigned long cr_no_alignment; /* defined in entry-armv.S */
174extern unsigned long cr_alignment; /* defined in entry-armv.S */
175
176#ifndef CONFIG_SMP
177static inline void adjust_cr(unsigned long mask, unsigned long set)
178{
179 unsigned long flags, cr;
180
181 mask &= ~CR_A;
182
183 set &= mask;
184
185 local_irq_save(flags);
186
187 cr_no_alignment = (cr_no_alignment & ~mask) | set;
188 cr_alignment = (cr_alignment & ~mask) | set;
189
190 set_cr((get_cr() & ~mask) | set);
191
192 local_irq_restore(flags);
193}
194#endif
195
196#define UDBG_UNDEFINED (1 << 0) 181#define UDBG_UNDEFINED (1 << 0)
197#define UDBG_SYSCALL (1 << 1) 182#define UDBG_SYSCALL (1 << 1)
198#define UDBG_BADABORT (1 << 2) 183#define UDBG_BADABORT (1 << 2)
@@ -248,8 +233,6 @@ static inline void sched_cacheflush(void)
248{ 233{
249} 234}
250 235
251#include <linux/irqflags.h>
252
253#ifdef CONFIG_SMP 236#ifdef CONFIG_SMP
254 237
255#define smp_mb() mb() 238#define smp_mb() mb()