Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arch/*/io.h: Add ioremap_uc() to all architectures

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 by 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.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Cc: Abhilash Kesavan <a.kesavan@samsung.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Borislav Petkov <bp@suse.de>
Cc: Chris Metcalf <cmetcalf@ezchip.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Greg Ungerer <gerg@uclinux.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
Cc: Kyle McMartin <kyle@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Hurley <peter@hurleysoftware.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Toshi Kani <toshi.kani@hp.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-am33-list@redhat.com
Cc: linux-arch@vger.kernel.org
Cc: linux-m68k@lists.linux-m68k.org
Cc: linux-sh@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Link: http://lkml.kernel.org/r/20150728181713.GB30479@wotan.suse.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

Luis R. Rodriguez and committed by
Ingo Molnar
4c73e892 7d89a3cb

+8
+1
arch/avr32/include/asm/io.h
··· 297 297 298 298 #define ioremap_wc ioremap_nocache 299 299 #define ioremap_wt ioremap_nocache 300 + #define ioremap_uc ioremap_nocache 300 301 301 302 #define cached(addr) P1SEGADDR(addr) 302 303 #define uncached(addr) P2SEGADDR(addr)
+1
arch/frv/include/asm/io.h
··· 278 278 } 279 279 280 280 #define ioremap_wc ioremap_nocache 281 + #define ioremap_uc ioremap_nocache 281 282 282 283 extern void iounmap(void volatile __iomem *addr); 283 284
+1
arch/m32r/include/asm/io.h
··· 69 69 #define ioremap_nocache(off,size) ioremap(off,size) 70 70 #define ioremap_wc ioremap_nocache 71 71 #define ioremap_wt ioremap_nocache 72 + #define ioremap_uc ioremap_nocache 72 73 73 74 /* 74 75 * IO bus memory addresses are also 1:1 with the physical address
+1
arch/m68k/include/asm/io_mm.h
··· 467 467 { 468 468 return __ioremap(physaddr, size, IOMAP_NOCACHE_SER); 469 469 } 470 + #define ioremap_uc ioremap_nocache 470 471 static inline void __iomem *ioremap_wt(unsigned long physaddr, 471 472 unsigned long size) 472 473 {
+1
arch/mn10300/include/asm/io.h
··· 283 283 284 284 #define ioremap_wc ioremap_nocache 285 285 #define ioremap_wt ioremap_nocache 286 + #define ioremap_uc ioremap_nocache 286 287 287 288 static inline void iounmap(void __iomem *addr) 288 289 {
+1
arch/powerpc/include/asm/io.h
··· 721 721 unsigned long flags); 722 722 extern void __iomem *ioremap_wc(phys_addr_t address, unsigned long size); 723 723 #define ioremap_nocache(addr, size) ioremap((addr), (size)) 724 + #define ioremap_uc(addr, size) ioremap((addr), (size)) 724 725 725 726 extern void iounmap(volatile void __iomem *addr); 726 727
+1
arch/sh/include/asm/io.h
··· 368 368 #endif 369 369 370 370 #define ioremap_nocache ioremap 371 + #define ioremap_uc ioremap 371 372 #define iounmap __iounmap 372 373 373 374 /*
+1
arch/tile/include/asm/io.h
··· 55 55 #define ioremap_nocache(physaddr, size) ioremap(physaddr, size) 56 56 #define ioremap_wc(physaddr, size) ioremap(physaddr, size) 57 57 #define ioremap_wt(physaddr, size) ioremap(physaddr, size) 58 + #define ioremap_uc(physaddr, size) ioremap(physaddr, size) 58 59 #define ioremap_fullcache(physaddr, size) ioremap(physaddr, size) 59 60 60 61 #define mmiowb()