arm64: acpi: Map EFI_MEMORY_WT memory as Normal-NC
authorWill Deacon <will@kernel.org>
Thu, 27 May 2021 11:03:18 +0000 (12:03 +0100)
committerWill Deacon <will@kernel.org>
Tue, 1 Jun 2021 17:53:53 +0000 (18:53 +0100)
commitee67c1103a1b50467969cf2cdb182c096c144459
tree2a6a328d383313b8d3dcfb65ebff4735f194680f
parent58cc6b72a2127475296502fcb4d2b5006b7f4742
arm64: acpi: Map EFI_MEMORY_WT memory as Normal-NC

The only user we have of Normal Write-Through memory is in the ACPI code
when mapping memory regions advertised as EFI_MEMORY_WT. Since most (all?)
CPUs treat write-through as non-cacheable under the hood, don't bother
with the extra memory type here and just treat EFI_MEMORY_WT the same way
as EFI_MEMORY_WC by mapping it to the Normal-NC memory type instead and
emitting a warning if we have failed to find an alternative EFI memory
type.

Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Christoph Hellwig <hch@lst.de>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20210527110319.22157-3-will@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/acpi.c