aboutsummaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/mmu_context.h
diff options
context:
space:
mode:
authorGravatar Steve Capper <steve.capper@arm.com> 2019-08-07 16:55:18 +0100
committerGravatar Will Deacon <will@kernel.org> 2019-08-09 11:17:21 +0100
commit5383cc6efed13784ddb3cff2cc183b6b8c50c8db (patch)
treee6a050f886096231108a344f6cad53bfa362d169 /arch/arm64/include/asm/mmu_context.h
parentarm64: mm: Introduce VA_BITS_MIN (diff)
downloadlinux-5383cc6efed13784ddb3cff2cc183b6b8c50c8db.tar.gz
linux-5383cc6efed13784ddb3cff2cc183b6b8c50c8db.tar.bz2
linux-5383cc6efed13784ddb3cff2cc183b6b8c50c8db.zip
arm64: mm: Introduce vabits_actual
In order to support 52-bit kernel addresses detectable at boot time, one needs to know the actual VA_BITS detected. A new variable vabits_actual is introduced in this commit and employed for the KVM hypervisor layout, KASAN, fault handling and phys-to/from-virt translation where there would normally be compile time constants. In order to maintain performance in phys_to_virt, another variable physvirt_offset is introduced. Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Steve Capper <steve.capper@arm.com> Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/include/asm/mmu_context.h')
-rw-r--r--arch/arm64/include/asm/mmu_context.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/mmu_context.h b/arch/arm64/include/asm/mmu_context.h
index 7ed0adb187a8..670003a55d28 100644
--- a/arch/arm64/include/asm/mmu_context.h
+++ b/arch/arm64/include/asm/mmu_context.h
@@ -95,7 +95,7 @@ static inline void __cpu_set_tcr_t0sz(unsigned long t0sz)
isb();
}
-#define cpu_set_default_tcr_t0sz() __cpu_set_tcr_t0sz(TCR_T0SZ(VA_BITS))
+#define cpu_set_default_tcr_t0sz() __cpu_set_tcr_t0sz(TCR_T0SZ(vabits_actual))
#define cpu_set_idmap_tcr_t0sz() __cpu_set_tcr_t0sz(idmap_t0sz)
/*