arm64: efi: Avoid dcache_clean_poc() altogether in efi_enter_kernel()
authorArd Biesheuvel <ardb@kernel.org>
Mon, 17 Oct 2022 14:28:22 +0000 (16:28 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Wed, 9 Nov 2022 11:42:01 +0000 (12:42 +0100)
commit7a35cb0a6ec0c4fbb3ea23526d56c59c8cdf779b
tree3c1ef51d0abea3acec90e670e7836b9aec0e4a9c
parentaaeb3fc614d65ec5c0b838ed1afb59c3f0f04643
arm64: efi: Avoid dcache_clean_poc() altogether in efi_enter_kernel()

To allow efi_enter_kernel() to be shared with the EFI zboot decompressor
build, drop another reference to dcache_clean_poc() and replace it with
a single DC CVAC* instruction. To ensure that it covers the remainder of
efi_enter_kernel() as intended, reorganize the code a bit so it fits in
a 32-byte cacheline, and align it to 32 bytes. (Even though the
architecture defines 16 as the minimum D-cache line size, even the
chosen value of 32 is highly unlikely to ever be encountered on real
hardware, and this works with any line size >= 32)

* due to ARM64_WORKAROUND_CLEAN_CACHE, we actually use a DC CIVAC here

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/efi-entry.S