summaryrefslogtreecommitdiff
path: root/arch/arm/mm/mmu.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2006-12-18 03:12:47 +0300
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-12-18 03:12:47 +0300
commit255d1f8639f5877381545d0da6821079ebad1c21 (patch)
tree8351dbb473602e4b837160e813db8c883c889f60 /arch/arm/mm/mmu.c
parent994adcc36d8c2133fce01f4d3fe4e41007555913 (diff)
downloadlinux-255d1f8639f5877381545d0da6821079ebad1c21.tar.xz
[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>
Diffstat (limited to 'arch/arm/mm/mmu.c')
-rw-r--r--arch/arm/mm/mmu.c20
1 files changed, 20 insertions, 0 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)
}
__setup("noalign", noalign_setup);
+#ifndef CONFIG_SMP
+void adjust_cr(unsigned long mask, unsigned long set)
+{
+ unsigned long flags;
+
+ mask &= ~CR_A;
+
+ set &= mask;
+
+ local_irq_save(flags);
+
+ cr_no_alignment = (cr_no_alignment & ~mask) | set;
+ cr_alignment = (cr_alignment & ~mask) | set;
+
+ set_cr((get_cr() & ~mask) | set);
+
+ local_irq_restore(flags);
+}
+#endif
+
struct mem_types {
unsigned int prot_pte;
unsigned int prot_l1;