diff options
author | Geoff Levand <geoff@infradead.org> | 2016-04-27 12:47:01 -0400 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2016-04-28 07:05:46 -0400 |
commit | e7227d0e528f9a96d4a866f43e20dd9b33f0e782 (patch) | |
tree | e526ce95b4a54d3c8139847f5cd8bcd317a5d546 /arch/arm64/kvm | |
parent | 7b7293ae3dbd0a1965bf310b77fed5f9bb37bb93 (diff) |
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')
-rw-r--r-- | arch/arm64/kvm/hyp-init.S | 5 |
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 @@ | |||
21 | #include <asm/kvm_arm.h> | 21 | #include <asm/kvm_arm.h> |
22 | #include <asm/kvm_mmu.h> | 22 | #include <asm/kvm_mmu.h> |
23 | #include <asm/pgtable-hwdef.h> | 23 | #include <asm/pgtable-hwdef.h> |
24 | #include <asm/sysreg.h> | ||
24 | 25 | ||
25 | .text | 26 | .text |
26 | .pushsection .hyp.idmap.text, "ax" | 27 | .pushsection .hyp.idmap.text, "ax" |
@@ -103,8 +104,8 @@ __do_hyp_init: | |||
103 | dsb sy | 104 | dsb sy |
104 | 105 | ||
105 | mrs x4, sctlr_el2 | 106 | mrs x4, sctlr_el2 |
106 | and x4, x4, #SCTLR_EL2_EE // preserve endianness of EL2 | 107 | and x4, x4, #SCTLR_ELx_EE // preserve endianness of EL2 |
107 | ldr x5, =SCTLR_EL2_FLAGS | 108 | ldr x5, =SCTLR_ELx_FLAGS |
108 | orr x4, x4, x5 | 109 | orr x4, x4, x5 |
109 | msr sctlr_el2, x4 | 110 | msr sctlr_el2, x4 |
110 | isb | 111 | isb |