From 89e44b51cc0db50ea4b5bbb5d582c4db88bbaed8 Mon Sep 17 00:00:00 2001 From: "Jonathan (Zhixiong) Zhang" Date: Fri, 4 Sep 2015 14:11:41 +0100 Subject: arm64, acpi/apei: Implement arch_apei_get_mem_attributes() Table 8 of UEFI 2.5 section 2.3.6.1 defines mappings from EFI memory types to MAIR attribute encodings for arm64. If the physical address has memory attributes defined by EFI memmap as EFI_MEMORY_[UC|WC|WT], return approprate page protection type according to the UEFI spec. Otherwise, return PAGE_KERNEL. Signed-off-by: Jonathan (Zhixiong) Zhang Signed-off-by: Matt Fleming [ Small stylistic tweaks. ] Reviewed-by: Matt Fleming Reviewed-by: Ard Biesheuvel Reviewed-by: Catalin Marinas Acked-by: Hanjun Guo Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Link: http://lkml.kernel.org/r/1441372302-23242-2-git-send-email-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar --- arch/arm64/include/asm/acpi.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/arm64/include/asm/acpi.h') diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h index 406485ed110a..5aa892a12a0d 100644 --- a/arch/arm64/include/asm/acpi.h +++ b/arch/arm64/include/asm/acpi.h @@ -92,4 +92,9 @@ static inline const char *acpi_get_enable_method(int cpu) { return acpi_psci_present() ? "psci" : NULL; } + +#ifdef CONFIG_ACPI_APEI +pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr); +#endif + #endif /*_ASM_ACPI_H*/ -- cgit v1.2.3-59-g8ed1b