summaryrefslogtreecommitdiff
path: root/arch/arm/mm/alignment.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2014-04-13 18:57:29 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-06-02 09:20:11 +0100
commitb4b20ad881f5a5c19ae9199547ddbb00fa4825eb (patch)
treee493f9f397590561e452a7eee1aa83e2fa8c0d28 /arch/arm/mm/alignment.c
parent4585eaff634b1bbb09686895221b3645f53f7a60 (diff)
ARM: provide common method to clear bits in CPU control register
Several places open-code this manipulation, let's consolidate this. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/alignment.c')
-rw-r--r--arch/arm/mm/alignment.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c
index 1ab611ce5009..53e268fcae45 100644
--- a/arch/arm/mm/alignment.c
+++ b/arch/arm/mm/alignment.c
@@ -28,6 +28,7 @@
#include <asm/opcodes.h>
#include "fault.h"
+#include "mm.h"
/*
* 32-bit misaligned trap handler (c) 1998 San Mehat (CCC) -July 1998
@@ -968,9 +969,7 @@ static int __init alignment_init(void)
#ifdef CONFIG_CPU_CP15
if (cpu_is_v6_unaligned()) {
- cr_alignment &= ~CR_A;
- cr_no_alignment &= ~CR_A;
- set_cr(cr_alignment);
+ set_cr(__clear_cr(CR_A));
ai_usermode = safe_usermode(ai_usermode, false);
}
#endif