Skip to contentSkip to conversation

Patch "ACPI / APEI: Replace ioremap_page_range() with fixmap" has been added to the 4.14-stable tree

PATCH [email protected] 1 participant 1 message Dec 21, 2017

Subsystems (5)
Stable branch x86 ACPI arm64 +1 more subsystems
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

ACPI / APEI: Replace ioremap_page_range() with fixmap

to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
acpi-apei-replace-ioremap_page_range-with-fixmap.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 4f89fa286f6729312e227e7c2d764e8e7b9d340e Mon Sep 17 00:00:00 2001

From: James Morse <[email protected]>
Date: Mon, 6 Nov 2017 18:44:24 +0000
Subject: ACPI / APEI: Replace ioremap_page_range() with fixmap

From: James Morse <[email protected]>

commit 4f89fa286f6729312e227e7c2d764e8e7b9d340e upstream.

Replace ghes_io{re,un}map_pfn_{nmi,irq}()s use of ioremap_page_range() with __set_fixmap() as ioremap_page_range() may sleep to allocate a new level of page-table, even if its passed an existing final-address to use in the mapping.

The GHES driver can only be enabled for architectures that select
HAVE_ACPI_APEI: Add fixmap entries to both x86 and arm64.

clear_fixmap() does the TLB invalidation in __set_fixmap() for arm64 and __set_pte_vaddr() for x86. In each case its the same as the respective arch_apei_flush_tlb_one().

---
 arch/arm64/include/asm/fixmap.h |    7 ++++++
 arch/x86/include/asm/fixmap.h   |    6 +++++
 drivers/acpi/apei/ghes.c        |   44 ++++++++++++----------------------------
 3 files changed, 27 insertions(+), 30 deletions(-)
arch/arm64/include/asm/fixmap.h +7 -0
@@ -51,6 +51,13 @@ enum fixed_addresses {
 
 	FIX_EARLYCON_MEM_BASE,
 	FIX_TEXT_POKE0,
+
+#ifdef CONFIG_ACPI_APEI_GHES
+	/* Used for GHES mapping from assorted contexts */
+	FIX_APEI_GHES_IRQ,
+	FIX_APEI_GHES_NMI,
+#endif /* CONFIG_ACPI_APEI_GHES */
+
 	__end_of_permanent_fixed_addresses,
 
 	/*
arch/x86/include/asm/fixmap.h +6 -0
@@ -104,6 +104,12 @@ enum fixed_addresses {
 	FIX_GDT_REMAP_BEGIN,
 	FIX_GDT_REMAP_END = FIX_GDT_REMAP_BEGIN + NR_CPUS - 1,
 
+#ifdef CONFIG_ACPI_APEI_GHES
+	/* Used for GHES mapping from assorted contexts */
+	FIX_APEI_GHES_IRQ,
+	FIX_APEI_GHES_NMI,
+#endif
+
 	__end_of_permanent_fixed_addresses,
 
 	/*
drivers/acpi/apei/ghes.c +14 -30

98 lines not on this page · raw message

Patches currently in stable-queue which might be from [email protected] are

queue-4.14/acpi-apei-replace-ioremap_page_range-with-fixmap.patch