aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2006-12-17 19:12:47 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-12-17 19:12:47 -0500
commit255d1f8639f5877381545d0da6821079ebad1c21 (patch)
tree8351dbb473602e4b837160e813db8c883c889f60
parent994adcc36d8c2133fce01f4d3fe4e41007555913 (diff)
[ARM] Fix warnings from asm/system.h
Move adjust_cr() into arch/arm/mm/mmu.c, and move irqflags.h to a more appropriate place in the header file. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/mm/mmu.c20
-rw-r--r--include/asm-arm/system.h33
2 files changed, 28 insertions, 25 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index f028aef9a861..655c8376f0b5 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -154,6 +154,26 @@ static int __init noalign_setup(char *__unused)
154} 154}
155__setup("noalign", noalign_setup); 155__setup("noalign", noalign_setup);
156 156
157#ifndef CONFIG_SMP
158void adjust_cr(unsigned long mask, unsigned long set)
159{
160 unsigned long flags;
161
162 mask &= ~CR_A;
163
164 set &= mask;
165
166 local_irq_save(flags);
167
168 cr_no_alignment = (cr_no_alignment & ~mask) | set;
169 cr_alignment = (cr_alignment & ~mask) | set;
170
171 set_cr((get_cr() & ~mask) | set);
172
173 local_irq_restore(flags);
174}
175#endif
176
157struct mem_types { 177struct mem_types {
158 unsigned int prot_pte; 178 unsigned int prot_pte;
159 unsigned int prot_l1; 179 unsigned int prot_l1;
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()