Skip to contentSkip to conversation

mm-move-is_ioremap_addr-into-new-header-file.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: mm: move is_ioremap_addr() into new header file
has been removed from the -mm tree. Its filename was
mm-move-is_ioremap_addr-into-new-header-file.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: mm: move is_ioremap_addr() into new header file
Date: Thu, 6 Jul 2023 23:45:17 +0800

Now is_ioremap_addr() is only used in kernel/iomem.c and gonna be used in mm/ioremap.c. Move it into its own new header file linux/ioremap.h.

Cc Alexander Gordeev <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Brian Cain <[email protected]>
Cc Catalin Marinas <[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 Kefeng Wang <[email protected]>
Cc Matthew Wilcox <[email protected]>
Cc Max Filippov <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Mike Rapoport (IBM) <[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 Will Deacon <[email protected]>
Cc Yoshinori Sato <[email protected]>

---

 arch/powerpc/include/asm/pgtable.h |   10 ---------
 include/linux/ioremap.h            |   30 +++++++++++++++++++++++++++
 include/linux/mm.h                 |    5 ----
 kernel/iomem.c                     |    1 
 mm/ioremap.c                       |   10 ---------
 5 files changed, 32 insertions(+), 24 deletions(-)
arch/powerpc/include/asm/pgtable.h renamed from arch/powerpc/include/asm/pgtable.h~mm-move-is_ioremap_addr-into-new-header-file +0 -10
@@ -157,16 +157,6 @@ static inline pgtable_t pmd_pgtable(pmd_
 	return (pgtable_t)pmd_page_vaddr(pmd);
 }
 
-#ifdef CONFIG_PPC64
-#define is_ioremap_addr is_ioremap_addr
-static inline bool is_ioremap_addr(const void *x)
-{
-	unsigned long addr = (unsigned long)x;
-
-	return addr >= IOREMAP_BASE && addr < IOREMAP_END;
-}
-#endif /* CONFIG_PPC64 */
-
 #endif /* __ASSEMBLY__ */
 
 #endif /* _ASM_POWERPC_PGTABLE_H */
include/linux/ioremap.h new file +30 -0
@@ -0,0 +1,30 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_IOREMAP_H
+#define _LINUX_IOREMAP_H
+
+#include <linux/kasan.h>
+#include <asm/pgtable.h>
+
+#if defined(CONFIG_HAS_IOMEM) || defined(CONFIG_GENERIC_IOREMAP)
+/*
+ * Ioremap often, but not always uses the generic vmalloc area. E.g on
+ * Power ARCH, it could have different ioremap space.
+ */
+#ifndef IOREMAP_START
+#define IOREMAP_START   VMALLOC_START
+#define IOREMAP_END     VMALLOC_END
+#endif
+static inline bool is_ioremap_addr(const void *x)
+{
+	unsigned long addr = (unsigned long)kasan_reset_tag(x);
+
+	return addr >= IOREMAP_START && addr < IOREMAP_END;
+}
+#else
+static inline bool is_ioremap_addr(const void *x)
+{
+	return false;
+}
+#endif
+
+#endif /* _LINUX_IOREMAP_H */
include/linux/mm.h renamed from include/linux/mm.h~mm-move-is_ioremap_addr-into-new-header-file +0 -5
@@ -1055,11 +1055,6 @@ unsigned long vmalloc_to_pfn(const void
  * On nommu, vmalloc/vfree wrap through kmalloc/kfree directly, so there
  * is no special casing required.
  */
-
-#ifndef is_ioremap_addr
-#define is_ioremap_addr(x) is_vmalloc_addr(x)
-#endif
-
 #ifdef CONFIG_MMU
 extern bool is_vmalloc_addr(const void *x);
 extern int is_vmalloc_or_module_addr(const void *x);
kernel/iomem.c renamed from kernel/iomem.c~mm-move-is_ioremap_addr-into-new-header-file +1 -0
@@ -3,6 +3,7 @@
 #include <linux/types.h>
 #include <linux/io.h>
 #include <linux/mm.h>
+#include <linux/ioremap.h>
 
 #ifndef ioremap_cache
 /* temporary while we convert existing ioremap_cache users to memremap */
mm/ioremap.c renamed from mm/ioremap.c~mm-move-is_ioremap_addr-into-new-header-file +1 -9
@@ -10,15 +10,7 @@
 #include <linux/mm.h>
 #include <linux/io.h>
 #include <linux/export.h>
-
-/*
- * Ioremap often, but not always uses the generic vmalloc area. E.g on
- * Power ARCH, it could have different ioremap space.
- */
-#ifndef IOREMAP_START
-#define IOREMAP_START   VMALLOC_START
-#define IOREMAP_END     VMALLOC_END
-#endif
+#include <linux/ioremap.h>
 
 void __iomem *generic_ioremap_prot(phys_addr_t phys_addr, size_t size,
 				   pgprot_t prot)

_

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