Skip to contentSkip to conversation

arch/*/io.h: remove ioremap_uc in some architectures

PATCH Superseded Baoquan He 4 participants 11 messages Mar 3, 2023 – Mar 7, 2023

Subsystems (11)

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Baoquan He

author
#0 lore raw

v3 cover arch/*/io.h: remove ioremap_uc in some architectures

This patchset tries to remove ioremap_uc() in the current architectures except of x86 and ia64. They will use the default ioremap_uc definition in <asm-generic/io.h> which returns NULL. If any arch sees a breakage caused by the default ioremap_uc(), it can provide a sepcific one for its own usage. This is done in patch 2.

To get rid of all of them other than x86 and ia64, add asm-generic/io.h to asm/io.h of mips ARCH. With this adding, we can get rid of the ioremap_uc() in mips too. Adding asm-generic/io.h is done in patch 1.

v2->v3:
- In patch 1, move those macro definition of functio near its function declaration according to Arnd's suggestion. And remove the unneeded change in asm/mmiowb.h introduced in old version.
- In patch 2, clean up and rewrite the messy document related to ioremap_uc() in Documentation/driver-api/device-io.rst.
v1->v2:
- Update log of patch 2, and document related to ioremap_uc() according to Geert's comment.
- Add Geert's Acked-by.

Baoquan He (2):
mips: add <asm-generic/io.h> including arch/*/io.h: remove ioremap_uc in some architectures

 Documentation/driver-api/device-io.rst | 14 +++--
 arch/alpha/include/asm/io.h            |  1 -
 arch/hexagon/include/asm/io.h          |  3 -
 arch/m68k/include/asm/kmap.h           |  1 -
 arch/mips/include/asm/io.h             | 79 +++++++++++++++++++++++---
 arch/parisc/include/asm/io.h           |  2 -
 arch/powerpc/include/asm/io.h          |  1 -
 arch/sh/include/asm/io.h               |  2 -
 arch/sparc/include/asm/io_64.h         |  1 -
 9 files changed, 79 insertions(+), 25 deletions(-)
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH v3 1/2 mips: add <asm-generic/io.h> including

With the adding, some default ioremap_xx methods defined in asm-generic/io.h can be used. E.g the default ioremap_uc() returning NULL.

Cc Thomas Bogendoerfer <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Helge Deller <[email protected]>
Cc Serge Semin <[email protected]>
Cc Florian Fainelli <[email protected]>
Cc Huacai Chen <[email protected]>
Cc Jiaxun Yang <[email protected]>
---
 arch/mips/include/asm/io.h | 78 ++++++++++++++++++++++++++++++++++----
 1 file changed, 70 insertions(+), 8 deletions(-)
arch/mips/include/asm/io.h +70 -8
index cec8347f0b85..6756baadba6c 100644
@@ -126,6 +126,7 @@ static inline phys_addr_t virt_to_phys(const volatile void *x)
  *     almost all conceivable cases a device driver should not be using
  *     this function
  */
+#define phys_to_virt phys_to_virt
 static inline void * phys_to_virt(unsigned long address)
 {
 	return __va(address);
@@ -359,6 +360,27 @@ __BUILD_MEMORY_PFX(__raw_, q, u64, 0)
 __BUILD_MEMORY_PFX(__mem_, q, u64, 0)
 #endif
 
+#define readb readb
+#define readw readw
+#define readl readl
+#define writeb writeb
+#define writew writew
+#define writel writel
+
+#ifdef CONFIG_64BIT
+#define readq readq
+#define writeq writeq
+#define __raw_readq __raw_readq
+#define __raw_writeq __raw_writeq
+#endif
+
+#define __raw_readb __raw_readb
+#define __raw_readw __raw_readw
+#define __raw_readl __raw_readl
+#define __raw_writeb __raw_writeb
+#define __raw_writew __raw_writew
+#define __raw_writel __raw_writel
+
 #define __BUILD_IOPORT_PFX(bus, bwlq, type)				\
 	__BUILD_IOPORT_SINGLE(bus, bwlq, type, 1, 0,)			\
 	__BUILD_IOPORT_SINGLE(bus, bwlq, type, 1, 0, _p)
@@ -374,6 +396,27 @@ BUILDIO_IOPORT(l, u32)
 BUILDIO_IOPORT(q, u64)
 #endif
 
+#define inb inb
+#define inw inw
+#define inl inl
+#define inb_p inb_p
+#define inw_p inw_p
+#define inl_p inl_p
+
+#define outb outb
+#define outw outw
+#define outl outl
+#define outb_p outb_p
+#define outw_p outw_p
+#define outl_p outl_p
+
+#ifdef CONFIG_64BIT
+#define inq inq
+#define outq outq
+#define inq_p inq_p
+#define outq_p outq_p
+#endif
+
 #define __BUILDIO(bwlq, type)						\
 									\
 __BUILD_MEMORY_SINGLE(____raw_, bwlq, type, 1, 0, 0)
@@ -412,14 +455,6 @@ __BUILDIO(q, u64)
 #define writeq_be(val, addr)						\
 	__raw_writeq(cpu_to_be64((val)), (__force unsigned *)(addr))
 
-/*
- * Some code tests for these symbols
- */
-#ifdef CONFIG_64BIT
-#define readq				readq
-#define writeq				writeq
-#endif
-
 #define __BUILD_MEMORY_STRING(bwlq, type)				\
 									\
 static inline void writes##bwlq(volatile void __iomem *mem,		\
@@ -480,14 +515,39 @@ BUILDSTRING(l, u32)
 BUILDSTRING(q, u64)
 #endif
 
+#define insb insb
+#define insw insw
+#define insl insl
+#define outsb outsb
+#define outsw outsw
+#define outsl outsl
+
+#define readsb readsb
+#define readsw readsw
+#define readsl readsl
+#define writesb writesb
+#define writesw writesw
+#define writesl writesl
+
+#ifdef CONFIG_64BIT
+#define insq insq
+#define readsq readsq
+#define readsq readsq
+#define writesq writesq
+#endif
+
+
+#define memset_io memset_io
 static inline void memset_io(volatile void __iomem *addr, unsigned char val, int count)
 {
 	memset((void __force *) addr, val, count);
 }
+#define memcpy_fromio memcpy_fromio
 static inline void memcpy_fromio(void *dst, const volatile void __iomem *src, int count)
 {
 	memcpy(dst, (void __force *) src, count);
 }
+#define memcpy_toio memcpy_toio
 static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int count)
 {
 	memcpy((void __force *) dst, src, count);
@@ -556,4 +616,6 @@ extern void (*_dma_cache_inv)(unsigned long start, unsigned long size);
 
 void __ioread64_copy(void *to, const void __iomem *from, size_t count);
 
+#include <asm-generic/io.h>
+
 #endif /* _ASM_IO_H */
Signature · 1 line
2.34.1
maintainer Reviewed-by on v3 1/2
#2 lore raw

Re: [PATCH v3 1/2] mips: add <asm-generic/io.h> including

Quoted 4 lines · Baoquan He

With the adding, some default ioremap_xx methods defined in asm-generic/io.h can be used. E.g the default ioremap_uc() returning NULL.

Quoted 9 lines
Cc Thomas Bogendoerfer <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Helge Deller <[email protected]>
Cc Serge Semin <[email protected]>
Cc Florian Fainelli <[email protected]>
Cc Huacai Chen <[email protected]>
Cc Jiaxun Yang <[email protected]>

I think this is all good. I had look at what cleanups we could do as follow-ups:

arch/mips/include/asm/io.h static inline phys_addr_t virt_to_phys(const volatile void *x) · line 132

Quoted 4 lines
arch/mips/include/asm/io.h +1 -0
+#define phys_to_virt phys_to_virt
 static inline void * phys_to_virt(unsigned long address)
 {
 	return __va(address);

This is the same as the asm-generic version, so the mips definition is no longer needed.

Quoted 14 lines
arch/mips/include/asm/io.h +10 -0
@@ -359,6 +360,27 @@ __BUILD_MEMORY_PFX(__raw_, q, u64, 0)
 __BUILD_MEMORY_PFX(__mem_, q, u64, 0)
 #endif
 
+#define readb readb
+#define readw readw
+#define readl readl
+#define writeb writeb
+#define writew writew
+#define writel writel
+
+#ifdef CONFIG_64BIT
+#define readq readq
+#define writeq writeq

arch/mips/include/asm/io.h __BUILD_MEMORY_PFX(__raw_, q, u64, 0) · line 382

Quoted 10 lines
arch/mips/include/asm/io.h +10 -0
+#define __raw_readq __raw_readq
+#define __raw_writeq __raw_writeq
+#endif
+
+#define __raw_readb __raw_readb
+#define __raw_readw __raw_readw
+#define __raw_readl __raw_readl
+#define __raw_writeb __raw_writeb
+#define __raw_writew __raw_writew
+#define __raw_writel __raw_writel

The mips code defines the __raw variants with slightly different semantics on both barriers and byteswap, which makes it impractical to share any of the above.

arch/mips/include/asm/io.h BUILDSTRING(l, u32) · line 550

Quoted 13 lines
arch/mips/include/asm/io.h +1 -0
+#define memset_io memset_io
 static inline void memset_io(volatile void __iomem *addr, unsigned 
 char val, int count)
 {
arch/mips/include/asm/io.h +1 -0
 	memset((void __force *) addr, val, count);
 }
+#define memcpy_fromio memcpy_fromio
 static inline void memcpy_fromio(void *dst, const volatile void 

__iomem *src, int count)
{

arch/mips/include/asm/io.h +1 -0
 	memcpy(dst, (void __force *) src, count);
 }
+#define memcpy_toio memcpy_toio

These are again the same as the generic version

Arnd

author
#3 lore raw

Re: [PATCH v3 1/2] mips: add <asm-generic/io.h> including

Quoted 15 lines · Arnd Bergmann
Quoted 4 lines · Baoquan He

With the adding, some default ioremap_xx methods defined in asm-generic/io.h can be used. E.g the default ioremap_uc() returning NULL.

Quoted 9 lines
Cc Thomas Bogendoerfer <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Helge Deller <[email protected]>
Cc Serge Semin <[email protected]>
Cc Florian Fainelli <[email protected]>
Cc Huacai Chen <[email protected]>
Cc Jiaxun Yang <[email protected]>
Quoted 4 lines

I think this is all good. I had look at what cleanups we could do as follow-ups:

Thanks a lot for careful reviewing and great suggestions.

Quoted 8 lines

arch/mips/include/asm/io.h static inline phys_addr_t virt_to_phys(const volatile void *x) · line 132

Quoted 5 lines
arch/mips/include/asm/io.h +1 -0
+#define phys_to_virt phys_to_virt
 static inline void * phys_to_virt(unsigned long address)
 {
 	return __va(address);

This is the same as the asm-generic version, so the mips definition is no longer needed.

Agree, I can clean this up with a followup patch.

Quoted 30 lines
Quoted 15 lines
arch/mips/include/asm/io.h +10 -0
@@ -359,6 +360,27 @@ __BUILD_MEMORY_PFX(__raw_, q, u64, 0)
 __BUILD_MEMORY_PFX(__mem_, q, u64, 0)
 #endif
 
+#define readb readb
+#define readw readw
+#define readl readl
+#define writeb writeb
+#define writew writew
+#define writel writel
+
+#ifdef CONFIG_64BIT
+#define readq readq
+#define writeq writeq

arch/mips/include/asm/io.h __BUILD_MEMORY_PFX(__raw_, q, u64, 0) · line 382

Quoted 10 lines
arch/mips/include/asm/io.h +10 -0
+#define __raw_readq __raw_readq
+#define __raw_writeq __raw_writeq
+#endif
+
+#define __raw_readb __raw_readb
+#define __raw_readw __raw_readw
+#define __raw_readl __raw_readl
+#define __raw_writeb __raw_writeb
+#define __raw_writew __raw_writew
+#define __raw_writel __raw_writel

The mips code defines the __raw variants with slightly different semantics on both barriers and byteswap, which makes it impractical to share any of the above.

Quoted 15 lines

arch/mips/include/asm/io.h BUILDSTRING(l, u32) · line 550

Quoted 13 lines
arch/mips/include/asm/io.h +1 -0
+#define memset_io memset_io
 static inline void memset_io(volatile void __iomem *addr, unsigned 
 char val, int count)
 {
arch/mips/include/asm/io.h +1 -0
 	memset((void __force *) addr, val, count);
 }
+#define memcpy_fromio memcpy_fromio
 static inline void memcpy_fromio(void *dst, const volatile void 

__iomem *src, int count)
{

arch/mips/include/asm/io.h +1 -0
 	memcpy(dst, (void __force *) src, count);
 }
+#define memcpy_toio memcpy_toio

These are again the same as the generic version

OK, can remove this with the above change.

author
#4 lore raw

PATCH v3 2/2 arch/*/io.h: remove ioremap_uc in some architectures

In reply to Baoquan He

ioremap_uc() is only meaningful on old x86-32 systems with the PAT extension, and on ia64 with its slightly unconventional ioremap() behavior, everywhere else this is the same as ioremap() anyway.

Here, remove the ioremap_uc() definition in architecutures other than x86 and ia64. These architectures all have asm-generic/io.h included and will have the default ioremap_uc() definition which returns NULL.

Note: This changes the existing behaviour and could break code calling ioremap_uc(). If any ARCH meets this breakage and really needs a specific ioremap_uc() for its own usage, one ioremap_uc() can be added in the ARCH.

---
 Documentation/driver-api/device-io.rst | 14 +++++++++-----
 arch/alpha/include/asm/io.h            |  1 -
 arch/hexagon/include/asm/io.h          |  3 ---
 arch/m68k/include/asm/kmap.h           |  1 -
 arch/mips/include/asm/io.h             |  1 -
 arch/parisc/include/asm/io.h           |  2 --
 arch/powerpc/include/asm/io.h          |  1 -
 arch/sh/include/asm/io.h               |  2 --
 arch/sparc/include/asm/io_64.h         |  1 -
 9 files changed, 9 insertions(+), 17 deletions(-)
Documentation/driver-api/device-io.rst +9 -5
index 4d2baac0311c..12c2ebbaa41e 100644
@@ -408,11 +408,15 @@ functions for details on the CPU side of things.
 ioremap_uc()
 ------------
 
-ioremap_uc() behaves like ioremap() except that on the x86 architecture without
-'PAT' mode, it marks memory as uncached even when the MTRR has designated
-it as cacheable, see Documentation/x86/pat.rst.
-
-Portable drivers should avoid the use of ioremap_uc().
+ioremap_uc() will be obsoleted since it's only expected on x86 and ia64.
+X86 non-PAT system marks memory as uncached even when the MTRR has designated
+it as cacheable in ioremap_uc()(see Documentation/x86/pat.rst). Ia64 system
+need check if attributes match, otherwise fails. Other than these two
+architectures, ioremap_uc() will default to NULL. Any architectures which
+meets breakage by ioremap_uc() returning NULL should provide a specific
+implementation to override the default version.
+
+Portable drivers should avoid the use of ioremap_uc(), use ioremap() instead.
 
 ioremap_cache()
 ---------------
arch/alpha/include/asm/io.h +0 -1
index 7aeaf7c30a6f..076f0e4e7f1e 100644
@@ -308,7 +308,6 @@ static inline void __iomem *ioremap(unsigned long port, unsigned long size)
 }
 
 #define ioremap_wc ioremap
-#define ioremap_uc ioremap
 
 static inline void iounmap(volatile void __iomem *addr)
 {
arch/hexagon/include/asm/io.h +0 -3
index dcd9cbbf5934..b9847472f25c 100644
@@ -176,9 +176,6 @@ static inline void writel(u32 data, volatile void __iomem *addr)
 #define _PAGE_IOREMAP (_PAGE_PRESENT | _PAGE_READ | _PAGE_WRITE | \
 		       (__HEXAGON_C_DEV << 6))
 
-#define ioremap_uc(addr, size) ioremap((addr), (size))
-
-
 #define __raw_writel writel
 
 static inline void memcpy_fromio(void *dst, const volatile void __iomem *src,
arch/m68k/include/asm/kmap.h +0 -1
index 4efb3efa593a..b778f015c917 100644
@@ -25,7 +25,6 @@ static inline void __iomem *ioremap(unsigned long physaddr, unsigned long size)
 	return __ioremap(physaddr, size, IOMAP_NOCACHE_SER);
 }
 
-#define ioremap_uc ioremap
 #define ioremap_wt ioremap_wt
 static inline void __iomem *ioremap_wt(unsigned long physaddr,
 				       unsigned long size)
arch/mips/include/asm/io.h +0 -1
index 6756baadba6c..da0a625c3c6d 100644
@@ -167,7 +167,6 @@ void iounmap(const volatile void __iomem *addr);
  */
 #define ioremap(offset, size)						\
 	ioremap_prot((offset), (size), _CACHE_UNCACHED)
-#define ioremap_uc		ioremap
 
 /*
  * ioremap_cache -	map bus memory into CPU space
arch/parisc/include/asm/io.h +0 -2
index 366537042465..48630c78714a 100644
@@ -132,8 +132,6 @@ static inline void gsc_writeq(unsigned long long val, unsigned long addr)
 
 #define ioremap_wc(addr, size)  \
 	ioremap_prot((addr), (size), _PAGE_IOREMAP)
-#define ioremap_uc(addr, size)  \
-	ioremap_prot((addr), (size), _PAGE_IOREMAP)
 
 #define pci_iounmap			pci_iounmap
 
arch/powerpc/include/asm/io.h +0 -1
index 978d687edf32..7873fc83c82c 100644
@@ -863,7 +863,6 @@ void __iomem *ioremap_wt(phys_addr_t address, unsigned long size);
 #endif
 
 void __iomem *ioremap_coherent(phys_addr_t address, unsigned long size);
-#define ioremap_uc(addr, size)		ioremap((addr), (size))
 #define ioremap_cache(addr, size) \
 	ioremap_prot((addr), (size), pgprot_val(PAGE_KERNEL))
 
arch/sh/include/asm/io.h +0 -2
index b3a26b405c8d..12a892804082 100644
@@ -278,8 +278,6 @@ unsigned long long poke_real_address_q(unsigned long long addr,
 	ioremap_prot((addr), (size), pgprot_val(PAGE_KERNEL))
 #endif /* CONFIG_MMU */
 
-#define ioremap_uc	ioremap
-
 /*
  * Convert a physical pointer to a virtual kernel pointer for /dev/mem
  * access
arch/sparc/include/asm/io_64.h +0 -1
index 9303270b22f3..d8ee1442f303 100644
@@ -423,7 +423,6 @@ static inline void __iomem *ioremap(unsigned long offset, unsigned long size)
 	return (void __iomem *)offset;
 }
 
-#define ioremap_uc(X,Y)			ioremap((X),(Y))
 #define ioremap_wc(X,Y)			ioremap((X),(Y))
 #define ioremap_wt(X,Y)			ioremap((X),(Y))
 static inline void __iomem *ioremap_np(unsigned long offset, unsigned long size)
Signature · 1 line
2.34.1
#5 lore raw
Quoted 9 lines · Baoquan He

ioremap_uc() is only meaningful on old x86-32 systems with the PAT extension, and on ia64 with its slightly unconventional ioremap() behavior, everywhere else this is the same as ioremap() anyway.

Here, remove the ioremap_uc() definition in architecutures other than x86 and ia64. These architectures all have asm-generic/io.h included and will have the default ioremap_uc() definition which returns NULL.

Quoted 4 lines

Note: This changes the existing behaviour and could break code calling ioremap_uc(). If any ARCH meets this breakage and really needs a specific ioremap_uc() for its own usage, one ioremap_uc() can be added in the ARCH.

I see one use in:

drivers/video/fbdev/aty/atyfb_base.c: par->ati_regbase = ioremap_uc(info->fix.mmio_start, 0x1000);

Which isn't obviously x86/ia64 specific.

I'm pretty sure some powermacs (powerpc) use that driver.

Maybe that exact code path is only reachable on x86/ia64? But if so please explain why.

Otherwise it looks like this series could break that driver on powerpc at least.

cheers

#6 lore raw

Hi Michael,

Quoted 15 lines · On Sun, Mar 5, 2023 at 10:23 AM Michael Ellerman <[email protected]> wrote:
Quoted 9 lines · Baoquan He

ioremap_uc() is only meaningful on old x86-32 systems with the PAT extension, and on ia64 with its slightly unconventional ioremap() behavior, everywhere else this is the same as ioremap() anyway.

Here, remove the ioremap_uc() definition in architecutures other than x86 and ia64. These architectures all have asm-generic/io.h included and will have the default ioremap_uc() definition which returns NULL.

Quoted 4 lines

Note: This changes the existing behaviour and could break code calling ioremap_uc(). If any ARCH meets this breakage and really needs a specific ioremap_uc() for its own usage, one ioremap_uc() can be added in the ARCH.

Quoted 8 lines

I see one use in:

drivers/video/fbdev/aty/atyfb_base.c: par->ati_regbase = ioremap_uc(info->fix.mmio_start, 0x1000);

Which isn't obviously x86/ia64 specific.

I'm pretty sure some powermacs (powerpc) use that driver.

I originally wrote that driver for CHRP, so yes.

Quoted 5 lines

Maybe that exact code path is only reachable on x86/ia64? But if so please explain why.

Otherwise it looks like this series could break that driver on powerpc at least.

Indeed.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
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
maintainer
#7 lore raw
Quoted 9 lines · Geert Uytterhoeven
Quoted 5 lines · On Sun, Mar 5, 2023 at 10:23 AM Michael Ellerman <[email protected]> wrote:

Maybe that exact code path is only reachable on x86/ia64? But if so please explain why.

Otherwise it looks like this series could break that driver on powerpc at least.

Indeed.

When I last looked into this, I sent a patch to use ioremap() on non-x86:

https://lore.kernel.org/all/[email protected]/

Arnd

#8 lore raw
Quoted 8 lines · Arnd Bergmann
Quoted 7 lines · Geert Uytterhoeven
Quoted 5 lines · On Sun, Mar 5, 2023 at 10:23 AM Michael Ellerman <[email protected]> wrote:

Maybe that exact code path is only reachable on x86/ia64? But if so please explain why.

Otherwise it looks like this series could break that driver on powerpc at least.

Quoted 6 lines
Quoted 1 line

Indeed.

When I last looked into this, I sent a patch to use ioremap() on non-x86:

https://lore.kernel.org/all/[email protected]/

OK thanks.

Baoquan can you add that patch to the start of this series if/when you post the next version?

cheers

author
#9 lore raw
Quoted 14 lines · Michael Ellerman
Quoted 13 lines · Arnd Bergmann
Quoted 8 lines · Geert Uytterhoeven
Quoted 5 lines · On Sun, Mar 5, 2023 at 10:23 AM Michael Ellerman <[email protected]> wrote:

Maybe that exact code path is only reachable on x86/ia64? But if so please explain why.

Otherwise it looks like this series could break that driver on powerpc at least.

Indeed.

When I last looked into this, I sent a patch to use ioremap() on non-x86:

Quoted 6 lines
Quoted 1 line

https://lore.kernel.org/all/[email protected]/

OK thanks.

Baoquan can you add that patch to the start of this series if/when you post the next version?

Sure, will do. Wondering if we need make change to cover powerpc other than x86 and ia64 in Arnd's patch as you and Geert pointed out.

maintainer
#10 lore raw
Quoted 17 lines · Baoquan He
Quoted 16 lines · Michael Ellerman
Quoted 14 lines · Arnd Bergmann
Quoted 8 lines · Geert Uytterhoeven
Quoted 5 lines · On Sun, Mar 5, 2023 at 10:23 AM Michael Ellerman <[email protected]> wrote:

Maybe that exact code path is only reachable on x86/ia64? But if so please explain why.

Otherwise it looks like this series could break that driver on powerpc at least.

Indeed.

When I last looked into this, I sent a patch to use ioremap() on non-x86:

https://lore.kernel.org/all/[email protected]/

Quoted 7 lines
Quoted 4 lines

OK thanks.

Baoquan can you add that patch to the start of this series if/when you post the next version?

Sure, will do. Wondering if we need make change to cover powerpc other than x86 and ia64 in Arnd's patch as you and Geert pointed out.

The patch fixes the aty driver for all architectures, including the ones that were already broken before your series with the 'return NULL' version.

The only other callers of ioremap_uc() and devm_ioremap_uc() are in architecture specific code and in drivers/mfd/intel-lpss.c, which is x86 specific.

Arnd