diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-04-13 18:57:29 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-06-02 09:20:11 +0100 |
commit | b4b20ad881f5a5c19ae9199547ddbb00fa4825eb (patch) | |
tree | e493f9f397590561e452a7eee1aa83e2fa8c0d28 /arch/arm/mm/init.c | |
parent | 4585eaff634b1bbb09686895221b3645f53f7a60 (diff) | |
download | linux-b4b20ad881f5a5c19ae9199547ddbb00fa4825eb.tar.gz linux-b4b20ad881f5a5c19ae9199547ddbb00fa4825eb.tar.bz2 linux-b4b20ad881f5a5c19ae9199547ddbb00fa4825eb.zip |
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/init.c')
-rw-r--r-- | arch/arm/mm/init.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 2a77ba8796ae..94332b1ad4bc 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -23,6 +23,7 @@ #include <linux/dma-contiguous.h> #include <linux/sizes.h> +#include <asm/cp15.h> #include <asm/mach-types.h> #include <asm/memblock.h> #include <asm/prom.h> @@ -36,6 +37,15 @@ #include "mm.h" +#ifdef CONFIG_CPU_CP15_MMU +unsigned long __init __clear_cr(unsigned long mask) +{ + cr_no_alignment = cr_no_alignment & ~mask; + cr_alignment = cr_alignment & ~mask; + return cr_alignment; +} +#endif + static phys_addr_t phys_initrd_start __initdata = 0; static unsigned long phys_initrd_size __initdata = 0; |