arch/*/io.h: Add ioremap_uc() to all architectures
Subsystems (4)
PATCH 1/1 arch/*/io.h: Add ioremap_uc() to all architectures
From: "Luis R. Rodriguez" <[email protected]>
This adds ioremap_uc() only for architectures that do not include asm-generic.h/io.h as that already provides a default definition for them for both cases where you have CONFIG_MMU and you do not, and because of this, the number of architectures this patch address is less than the architectures that the ioremap_wt() patch addressed, "arch/*/io.h: Add ioremap_wt() to all architectures").
In order to reduce the number of architectures we have to modify when adding new architecture IO APIs we'll have to review the architectures in this patch, see why they can't add asm-generic.h/io.h or issues that would be created by doing so and then spread a consistent inclusion of this header towards the end of their own header. For instance arch/metag includes the asm-generic/io.h *before* the ioremap*() definitions, this should be the other way around but only once we have guard wrappers for the non-MMU case also for asm-generic/io.h.
--- arch/avr32/include/asm/io.h | 1 + arch/frv/include/asm/io.h | 1 + arch/m32r/include/asm/io.h | 1 + arch/m68k/include/asm/io_mm.h | 1 + arch/mn10300/include/asm/io.h | 1 + arch/powerpc/include/asm/io.h | 1 + arch/sh/include/asm/io.h | 1 + arch/tile/include/asm/io.h | 1 + 8 files changed, 8 insertions(+)
arch/avr32/include/asm/io.h +1 -0
@@ -297,6 +297,7 @@ extern void __iounmap(void __iomem *addr);#define ioremap_wc ioremap_nocache#define ioremap_wt ioremap_nocache +#define ioremap_uc ioremap_nocache#define cached (addr) P1SEGADDR(addr)#define uncached (addr) P2SEGADDR(addr)
arch/frv/include/asm/io.h +1 -0
@@ -278,6 +278,7 @@ static inline void __iomem *ioremap_fullcache(unsigned long physaddr, unsigned l }#define ioremap_wc ioremap_nocache +#define ioremap_uc ioremap_nocacheextern void iounmap (void volatile __iomem *addr);
arch/m32r/include/asm/io.h +1 -0
@@ -69,6 +69,7 @@ extern void iounmap(volatile void __iomem *addr);#define ioremap_nocache (off,size) ioremap(off,size)#define ioremap_wc ioremap_nocache#define ioremap_wt ioremap_nocache +#define ioremap_uc ioremap_nocache/* * IO bus memory addresses are also 1:1 with the physical address
arch/m68k/include/asm/io_mm.h +1 -0
@@ -468,6 +468,7 @@ static inline void __iomem *ioremap_nocache(unsigned long physaddr, unsigned lon {return __ioremap (physaddr, size,IOMAP_NOCACHE_SER ); } +#define ioremap_uc ioremap_nocachestatic inline void __iomem *ioremap_wt (unsigned long physaddr,unsigned long size) {
arch/mn10300/include/asm/io.h +1 -0
@@ -283,6 +283,7 @@ static inline void __iomem *ioremap_nocache(unsigned long offset, unsigned long#define ioremap_wc ioremap_nocache#define ioremap_wt ioremap_nocache +#define ioremap_uc ioremap_nocachestatic inline void iounmap (void __iomem *addr) {
arch/powerpc/include/asm/io.h +1 -0
@@ -721,6 +721,7 @@ extern void __iomem *ioremap_prot(phys_addr_t address, unsigned long size, unsigned long flags);extern void __iomem *ioremap_wc (phys_addr_t address,unsigned long size);#define ioremap_nocache (addr, size) ioremap((addr), (size)) +#define ioremap_uc (addr, size) ioremap((addr), (size))extern void iounmap (volatile void __iomem *addr);
arch/sh/include/asm/io.h +1 -0
@@ -368,6 +368,7 @@ static inline int iounmap_fixed(void __iomem *addr) { return -EINVAL; }#endif #define ioremap_nocache ioremap +#define ioremap_uc ioremap#define iounmap __iounmap/*
arch/tile/include/asm/io.h +1 -0
@@ -55,6 +55,7 @@ extern void iounmap(volatile void __iomem *addr);#define ioremap_nocache (physaddr, size) ioremap(physaddr, size)#define ioremap_wc (physaddr, size) ioremap(physaddr, size)#define ioremap_wt (physaddr, size) ioremap(physaddr, size) +#define ioremap_uc (physaddr, size) ioremap(physaddr, size)#define ioremap_fullcache (physaddr, size) ioremap(physaddr, size)#define mmiowb ()
Signature · 1 line
2.3.2.209.gd67f9d5.dirty
Hi Luis,
Quoted 25 lines · On Tue, 28 Jul 2015 11:22:07 -0700 "Luis R. Rodriguez"…
From: "Luis R. Rodriguez" <[email protected]>
This adds
ioremap_uc()only for architectures that do not includeasm-generic.h/io.has that already provides a default definition for them for both cases where you haveCONFIG_MMUand you do not, and because of this, the number of architectures this patch address is less than the architectures that theioremap_wt()patch addressed, "arch/*/io.h: Addioremap_wt()to all architectures").In order to reduce the number of architectures we have to modify when adding new architecture IO APIs we'll have to review the architectures in this patch, see why they can't add
asm-generic.h/io.hor issues that would be created by doing so and then spread a consistent inclusion of this header towards the end of their own header. For instancearch/metagincludes theasm-generic/io.h*before* the ioremap*() definitions, this should be the other way around but only once we have guard wrappers for the non-MMU case also forasm-generic/io.h.Cc Arnd Bergmann <[email protected]>Reported-by Stephen Rothwell <[email protected]>Signed-off-by Luis R. Rodriguez <[email protected]>
Quoted 10 lines
--- arch/avr32/include/asm/io.h | 1 + arch/frv/include/asm/io.h | 1 + arch/m32r/include/asm/io.h | 1 + arch/m68k/include/asm/io_mm.h | 1 + arch/mn10300/include/asm/io.h | 1 + arch/powerpc/include/asm/io.h | 1 + arch/sh/include/asm/io.h | 1 + arch/tile/include/asm/io.h | 1 + 8 files changed, 8 insertions(+)
I have added this to linux-next today instead of reverting the other 2 patches.
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]