Skip to contentSkip to conversation

arm64-mm-add-wrapper-function-ioremap_prot.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Aug 11, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: arm64 : mm: add wrapper function ioremap_prot()
has been removed from the -mm tree. Its filename was
arm64-mm-add-wrapper-function-ioremap_prot.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Baoquan He <[email protected]>
Subject: arm64 : mm: add wrapper function ioremap_prot()
Date: Thu, 6 Jul 2023 23:45:19 +0800

Since hook functions ioremap_allowed() and iounmap_allowed() will be obsoleted, add wrapper function ioremap_prot() to contain the the specific handling in addition to generic_ioremap_prot() invocation.

Cc Catalin Marinas <[email protected]>
Cc Will Deacon <[email protected]>
Cc Alexander Gordeev <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Brian Cain <[email protected]>
Cc Christian Borntraeger <[email protected]>
Cc Christophe Leroy <[email protected]>
Cc Chris Zankel <[email protected]>
Cc David Laight <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Gerald Schaefer <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Helge Deller <[email protected]>
Cc "James E.J. Bottomley" <[email protected]>
Cc John Paul Adrian Glaubitz <[email protected]>
Cc Jonas Bonn <[email protected]>
Cc Matthew Wilcox <[email protected]>
Cc Max Filippov <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Nathan Chancellor <[email protected]>
Cc Nicholas Piggin <[email protected]>
Cc Niklas Schnelle <[email protected]>
Cc Rich Felker <[email protected]>
Cc Stafford Horne <[email protected]>
Cc Stefan Kristiansson <[email protected]>
Cc Sven Schnelle <[email protected]>
Cc Vasily Gorbik <[email protected]>
Cc Vineet Gupta <[email protected]>
Cc Yoshinori Sato <[email protected]>

---

 arch/arm64/include/asm/io.h |    3 +--
 arch/arm64/mm/ioremap.c     |   10 ++++++----
 2 files changed, 7 insertions(+), 6 deletions(-)
arch/arm64/include/asm/io.h renamed from arch/arm64/include/asm/io.h~arm64-mm-add-wrapper-function-ioremap_prot +1 -2
@@ -139,8 +139,7 @@ extern void __memset_io(volatile void __
  * I/O memory mapping functions.
  */
 
-bool ioremap_allowed(phys_addr_t phys_addr, size_t size, unsigned long prot);
-#define ioremap_allowed ioremap_allowed
+#define ioremap_prot ioremap_prot
 
 #define _PAGE_IOREMAP PROT_DEVICE_nGnRE
 
arch/arm64/mm/ioremap.c renamed from arch/arm64/mm/ioremap.c~arm64-mm-add-wrapper-function-ioremap_prot +6 -4
@@ -3,20 +3,22 @@
 #include <linux/mm.h>
 #include <linux/io.h>
 
-bool ioremap_allowed(phys_addr_t phys_addr, size_t size, unsigned long prot)
+void __iomem *ioremap_prot(phys_addr_t phys_addr, size_t size,
+			   unsigned long prot)
 {
 	unsigned long last_addr = phys_addr + size - 1;
 
 	/* Don't allow outside PHYS_MASK */
 	if (last_addr & ~PHYS_MASK)
-		return false;
+		return NULL;
 
 	/* Don't allow RAM to be mapped. */
 	if (WARN_ON(pfn_is_map_memory(__phys_to_pfn(phys_addr))))
-		return false;
+		return NULL;
 
-	return true;
+	return generic_ioremap_prot(phys_addr, size, __pgprot(prot));
 }
+EXPORT_SYMBOL(ioremap_prot);
 
 /*
  * Must be called after early_fixmap_init

_

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

net-altera-tse-make-altera_tse-depend-on-has_iomem.patch irqchip-al-fic-make-al_fic-depend-on-has_iomem.patch