Skip to contentSkip to conversation

ioremap cleanups

PATCH In review Christoph Hellwig 3 participants 6 messages Aug 30, 2019 – Sep 2, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

these are three cleanups from my generic ioremap series that needed a few edits, and which I'd like you to pick up through your respective arch trees for 5.4 if possible.

#1 lore raw

PATCH 1/3 m68k: remove ioremap_fullcache

No callers of this function.

---
 arch/m68k/include/asm/kmap.h | 7 -------
 1 file changed, 7 deletions(-)
arch/m68k/include/asm/kmap.h +0 -7
index aac7f045f7f0..03d904fe6087 100644
@@ -43,13 +43,6 @@ static inline void __iomem *ioremap_wt(unsigned long physaddr,
 	return __ioremap(physaddr, size, IOMAP_WRITETHROUGH);
 }
 
-#define ioremap_fullcache ioremap_fullcache
-static inline void __iomem *ioremap_fullcache(unsigned long physaddr,
-					      unsigned long size)
-{
-	return __ioremap(physaddr, size, IOMAP_FULL_CACHING);
-}
-
 #define memset_io memset_io
 static inline void memset_io(volatile void __iomem *addr, unsigned char val,
 			     int count)
Signature · 1 line
2.20.1
#2 lore raw

PATCH 2/3 microblaze: remove ioremap_fullcache

In reply to Christoph Hellwig

No callers of this function.

---
 arch/microblaze/include/asm/io.h | 1 -
 1 file changed, 1 deletion(-)
arch/microblaze/include/asm/io.h +0 -1
index c7968139486f..86c95b2a1ce1 100644
@@ -40,7 +40,6 @@ extern void iounmap(volatile void __iomem *addr);
 
 extern void __iomem *ioremap(phys_addr_t address, unsigned long size);
 #define ioremap_nocache(addr, size)		ioremap((addr), (size))
-#define ioremap_fullcache(addr, size)		ioremap((addr), (size))
 #define ioremap_wc(addr, size)			ioremap((addr), (size))
 #define ioremap_wt(addr, size)			ioremap((addr), (size))
 
Signature · 1 line
2.20.1
maintainer
#3 lore raw

Re: [PATCH 2/3] microblaze: remove ioremap_fullcache

Quoted 13 lines · Christoph Hellwig

No callers of this function.

---
 arch/microblaze/include/asm/io.h | 1 -
 1 file changed, 1 deletion(-)
arch/microblaze/include/asm/io.h +0 -0
index c7968139486f..86c95b2a1ce1 100644

arch/microblaze/include/asm/io.h extern void iounmap(volatile void __iomem *addr); · line 45

Quoted 7 lines
arch/microblaze/include/asm/io.h +0 -1
@@ -40,7 +40,6 @@ extern void iounmap(volatile void __iomem *addr);
 
 extern void __iomem *ioremap(phys_addr_t address, unsigned long size);
 #define ioremap_nocache(addr, size)		ioremap((addr), (size))
-#define ioremap_fullcache(addr, size)		ioremap((addr), (size))
 #define ioremap_wc(addr, size)			ioremap((addr), (size))
 #define ioremap_wt(addr, size)			ioremap((addr), (size))
 

This single patch applied for v5.4 via microblaze tree.

Thanks,
Michal

Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs
#4 lore raw

PATCH 3/3 ia64: rename ioremap_nocache to ioremap_uc

In reply to Christoph Hellwig

On ia64 ioremap_nocache fails if attributes don't match. Not other architectures does this, and we plan to get rid of ioremap_nocache. So get rid of the special semantics and define ioremap_nocache in terms of ioremap as no portable driver could rely on the behavior anyway.

However x86 implements ioremap_uc in a similar way as the ia64 version of ioremap_nocache, so implement that instead.

---
 arch/ia64/include/asm/io.h | 6 +++---
 arch/ia64/mm/ioremap.c     | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
arch/ia64/include/asm/io.h +3 -3
index a511d62d447a..febd2c6ea0b4 100644
@@ -412,16 +412,16 @@ __writeq (unsigned long val, volatile void __iomem *addr)
 # ifdef __KERNEL__
 
 extern void __iomem * ioremap(unsigned long offset, unsigned long size);
-extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size);
+extern void __iomem * ioremap_uc(unsigned long offset, unsigned long size);
 extern void iounmap (volatile void __iomem *addr);
 static inline void __iomem * ioremap_cache (unsigned long phys_addr, unsigned long size)
 {
 	return ioremap(phys_addr, size);
 }
 #define ioremap ioremap
-#define ioremap_nocache ioremap_nocache
+#define ioremap_nocache ioremap
 #define ioremap_cache ioremap_cache
-#define ioremap_uc ioremap_nocache
+#define ioremap_uc ioremap_uc
 #define iounmap iounmap
 
 /*
arch/ia64/mm/ioremap.c +2 -2
index 0c0de2c4ec69..a09cfa064536 100644
@@ -99,14 +99,14 @@ ioremap (unsigned long phys_addr, unsigned long size)
 EXPORT_SYMBOL(ioremap);
 
 void __iomem *
-ioremap_nocache (unsigned long phys_addr, unsigned long size)
+ioremap_uc(unsigned long phys_addr, unsigned long size)
 {
 	if (kern_mem_attribute(phys_addr, size) & EFI_MEMORY_WB)
 		return NULL;
 
 	return __ioremap_uc(phys_addr);
 }
-EXPORT_SYMBOL(ioremap_nocache);
+EXPORT_SYMBOL(ioremap_uc);
 
 void
 early_iounmap (volatile void __iomem *addr, unsigned long size)
Signature · 1 line
2.20.1
#5 lore raw
In reply to Christoph Hellwig

Hi Christoph,

Quoted 3 lines · Christoph Hellwig

these are three cleanups from my generic ioremap series that needed a few edits, and which I'd like you to pick up through your respective arch trees for 5.4 if possible.

Thanks, [1/3] applied and queued for v5.4 in the m68k tree.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds