summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kvm/hyp-init.S
diff options
context:
space:
mode:
authorGeoff Levand <geoff@infradead.org>2016-04-27 18:47:01 +0200
committerWill Deacon <will.deacon@arm.com>2016-04-28 13:05:46 +0200
commite7227d0e528f9a96d4a866f43e20dd9b33f0e782 (patch)
treee526ce95b4a54d3c8139847f5cd8bcd317a5d546 /arch/arm64/kvm/hyp-init.S
parentarm64: Fold proc-macros.S into assembler.h (diff)
downloadlinux-e7227d0e528f9a96d4a866f43e20dd9b33f0e782.tar.xz
linux-e7227d0e528f9a96d4a866f43e20dd9b33f0e782.zip
arm64: Cleanup SCTLR flags
We currently have macros defining flags for the arm64 sctlr registers in both kvm_arm.h and sysreg.h. To clean things up and simplify move the definitions of the SCTLR_EL2 flags from kvm_arm.h to sysreg.h, rename any SCTLR_EL1 or SCTLR_EL2 flags that are common to both registers to be SCTLR_ELx, with 'x' indicating a common flag, and fixup all files to include the proper header or to use the new macro names. Signed-off-by: Geoff Levand <geoff@infradead.org> [Restored pgtable-hwdef.h include] Signed-off-by: James Morse <james.morse@arm.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kvm/hyp-init.S')
-rw-r--r--arch/arm64/kvm/hyp-init.S5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm64/kvm/hyp-init.S b/arch/arm64/kvm/hyp-init.S
index 7d8747c6427c..5ce1b47ef770 100644
--- a/arch/arm64/kvm/hyp-init.S
+++ b/arch/arm64/kvm/hyp-init.S
@@ -21,6 +21,7 @@
#include <asm/kvm_arm.h>
#include <asm/kvm_mmu.h>
#include <asm/pgtable-hwdef.h>
+#include <asm/sysreg.h>
.text
.pushsection .hyp.idmap.text, "ax"
@@ -103,8 +104,8 @@ __do_hyp_init:
dsb sy
mrs x4, sctlr_el2
- and x4, x4, #SCTLR_EL2_EE // preserve endianness of EL2
- ldr x5, =SCTLR_EL2_FLAGS
+ and x4, x4, #SCTLR_ELx_EE // preserve endianness of EL2
+ ldr x5, =SCTLR_ELx_FLAGS
orr x4, x4, x5
msr sctlr_el2, x4
isb