]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/x86/include/asm/acpi.h
Merge remote-tracking branch 'omap/for-next'
[karo-tx-linux.git] / arch / x86 / include / asm / acpi.h
index 3a45668f6dc38312bc9f5761214f076a144d00d4..94c18ebfd68cafaec66c6fc0b8c31ccdf37641fb 100644 (file)
 #include <asm/mpspec.h>
 #include <asm/realmode.h>
 
+#ifdef CONFIG_ACPI_APEI
+# include <asm/pgtable_types.h>
+#endif
+
 #ifdef CONFIG_ACPI
 extern int acpi_lapic;
 extern int acpi_ioapic;
@@ -147,4 +151,23 @@ extern int x86_acpi_numa_init(void);
 
 #define acpi_unlazy_tlb(x)     leave_mm(x)
 
+#ifdef CONFIG_ACPI_APEI
+static inline pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr)
+{
+       /*
+        * We currently have no way to look up the EFI memory map
+        * attributes for a region in a consistent way, because the
+        * memmap is discarded after efi_free_boot_services(). So if
+        * you call efi_mem_attributes() during boot and at runtime,
+        * you could theoretically see different attributes.
+        *
+        * Since we are yet to see any x86 platforms that require
+        * anything other than PAGE_KERNEL (some arm64 platforms
+        * require the equivalent of PAGE_KERNEL_NOCACHE), return that
+        * until we know differently.
+        */
+        return PAGE_KERNEL;
+}
+#endif
+
 #endif /* _ASM_X86_ACPI_H */