|
@@ -105,12 +105,16 @@ static DEFINE_MUTEX(ghes_list_mutex);
|
|
|
*/
|
|
|
|
|
|
/*
|
|
|
- * Two virtual pages are used, one for NMI context, the other for
|
|
|
- * IRQ/PROCESS context
|
|
|
+ * Two virtual pages are used, one for IRQ/PROCESS context, the other for
|
|
|
+ * NMI context (optionally).
|
|
|
*/
|
|
|
-#define GHES_IOREMAP_PAGES 2
|
|
|
-#define GHES_IOREMAP_NMI_PAGE(base) (base)
|
|
|
-#define GHES_IOREMAP_IRQ_PAGE(base) ((base) + PAGE_SIZE)
|
|
|
+#ifdef CONFIG_HAVE_ACPI_APEI_NMI
|
|
|
+#define GHES_IOREMAP_PAGES 2
|
|
|
+#else
|
|
|
+#define GHES_IOREMAP_PAGES 1
|
|
|
+#endif
|
|
|
+#define GHES_IOREMAP_IRQ_PAGE(base) (base)
|
|
|
+#define GHES_IOREMAP_NMI_PAGE(base) ((base) + PAGE_SIZE)
|
|
|
|
|
|
/* virtual memory area for atomic ioremap */
|
|
|
static struct vm_struct *ghes_ioremap_area;
|
|
@@ -173,7 +177,7 @@ static void ghes_iounmap_nmi(void __iomem *vaddr_ptr)
|
|
|
|
|
|
BUG_ON(vaddr != (unsigned long)GHES_IOREMAP_NMI_PAGE(base));
|
|
|
unmap_kernel_range_noflush(vaddr, PAGE_SIZE);
|
|
|
- __flush_tlb_one(vaddr);
|
|
|
+ arch_apei_flush_tlb_one(vaddr);
|
|
|
}
|
|
|
|
|
|
static void ghes_iounmap_irq(void __iomem *vaddr_ptr)
|
|
@@ -183,7 +187,7 @@ static void ghes_iounmap_irq(void __iomem *vaddr_ptr)
|
|
|
|
|
|
BUG_ON(vaddr != (unsigned long)GHES_IOREMAP_IRQ_PAGE(base));
|
|
|
unmap_kernel_range_noflush(vaddr, PAGE_SIZE);
|
|
|
- __flush_tlb_one(vaddr);
|
|
|
+ arch_apei_flush_tlb_one(vaddr);
|
|
|
}
|
|
|
|
|
|
static int ghes_estatus_pool_init(void)
|