linux/arch/arm64
Mark Brown 09e3c22a86 arm64: Use a variable to store non-global mappings decision
Refactor the code which checks to see if we need to use non-global
mappings to use a variable instead of checking with the CPU capabilities
each time, doing the initial check for KPTI early in boot before we
start allocating memory so we still avoid transitioning to non-global
mappings in common cases.

Since this variable always matches our decision about non-global
mappings this means we can also combine arm64_kernel_use_ng_mappings()
and arm64_unmap_kernel_at_el0() into a single function, the variable
simply stores the result and the decision code is elsewhere. We could
just have the users check the variable directly but having a function
makes it clear that these uses are read-only.

The result is that we simplify the code a bit and reduces the amount of
code executed at runtime.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
2020-01-15 14:11:18 +00:00
..
boot arm64: dts: ls1028a: fix reboot node 2019-12-12 09:59:38 +08:00
configs arm64: defconfig: re-run savedefconfig 2019-12-05 13:20:17 -08:00
crypto crypto: arch - conditionalize crypto api in arch glue for lib code 2019-11-27 13:08:49 +08:00
include arm64: Use a variable to store non-global mappings decision 2020-01-15 14:11:18 +00:00
kernel arm64: Use a variable to store non-global mappings decision 2020-01-15 14:11:18 +00:00
kvm PPC: 2019-12-22 10:26:59 -08:00
lib arm64: uaccess: Remove uaccess_*_not_uao asm macros 2019-11-20 18:51:54 +00:00
mm arm64 updates for 5.5: 2019-12-06 14:18:01 -08:00
net arm64: bpf: optimize modulo operation 2019-09-03 15:44:40 +02:00
xen xen/efi: have a common runtime setup function 2019-10-02 10:31:07 -04:00
Kbuild arm64: add arch/arm64/Kbuild 2019-08-21 18:47:15 +01:00
Kconfig arm64: Add initial support for E0PD 2020-01-15 14:11:02 +00:00
Kconfig.debug treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Kconfig.platforms i.MX SoC update for 5.5: 2019-11-06 07:46:42 -08:00
Makefile arm64: implement ftrace with regs 2019-11-06 14:17:35 +00:00