diff options
author | James Morse <james.morse@arm.com> | 2015-07-21 14:23:27 +0200 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2015-07-27 12:08:41 +0200 |
commit | 870828e57b141eff76a5325f20e4691dd2a599b1 (patch) | |
tree | 68b660c89ce5b145a726fb674662024936e7a870 /arch/arm64/kernel/armv8_deprecated.c | |
parent | arm64: kvm: Adopt new alternative assembler macros (diff) | |
download | linux-870828e57b141eff76a5325f20e4691dd2a599b1.tar.xz linux-870828e57b141eff76a5325f20e4691dd2a599b1.zip |
arm64: kernel: Move config_sctlr_el1
Later patches need config_sctlr_el1 to set/clear bits in the sctlr_el1
register.
This patch moves this function into header a file.
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kernel/armv8_deprecated.c')
-rw-r--r-- | arch/arm64/kernel/armv8_deprecated.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/arch/arm64/kernel/armv8_deprecated.c b/arch/arm64/kernel/armv8_deprecated.c index 7922c2e710ca..78d56bff91fd 100644 --- a/arch/arm64/kernel/armv8_deprecated.c +++ b/arch/arm64/kernel/armv8_deprecated.c @@ -16,6 +16,7 @@ #include <asm/insn.h> #include <asm/opcodes.h> +#include <asm/sysreg.h> #include <asm/system_misc.h> #include <asm/traps.h> #include <asm/uaccess.h> @@ -504,16 +505,6 @@ ret: return 0; } -static inline void config_sctlr_el1(u32 clear, u32 set) -{ - u32 val; - - asm volatile("mrs %0, sctlr_el1" : "=r" (val)); - val &= ~clear; - val |= set; - asm volatile("msr sctlr_el1, %0" : : "r" (val)); -} - static int cp15_barrier_set_hw_mode(bool enable) { if (enable) |