mbox series

[0/2] ARM: decompressor: use by-VA cache maintenance for v7 cores

Message ID 20200218164430.32671-1-ardb@kernel.org (mailing list archive)
Headers show
Series ARM: decompressor: use by-VA cache maintenance for v7 cores | expand

Message

Ard Biesheuvel Feb. 18, 2020, 4:44 p.m. UTC
While making changes to the EFI stub startup code, I noticed that we are
still doing set/way maintenance on the caches when booting on v7 cores.
This works today on VMs by virtue of the fact that KVM traps set/way ops
and cleans the whole address space by VA on behalf of the guest, and on
most v7 hardware, the set/way ops are in fact sufficient when only one
core is running, as there usually is no system cache.

But let's make this code a bit more future proof, by switching to by-VA
ops for the v7 code paths (and for ARM1176, as a side effect).

Note that these patches are based on an EFI stub fix that I have omitted
here, and which can be found at

https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/commit/?h=arm32-efi-cache-ops&id=01d742dcf0a3dce6f6db9e4661750129bc3d3216

Cc: Russell King <linux@armlinux.org.uk>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Catalin Marinas <catalin.marinas@arm.com>

Ard Biesheuvel (2):
  ARM: decompressor: prepare cache_clean_flush for doing by-VA
    maintenance
  ARM: decompressor: switch to by-VA cache maintenance for v7 cores

 arch/arm/boot/compressed/head.S | 105 ++++++++++----------
 1 file changed, 54 insertions(+), 51 deletions(-)