aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/io_64.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-06-07arch/*/io.h: Add ioremap_wt() to all architecturesToshi Kani1-0/+1
Add ioremap_wt() to all arch-specific asm/io.h headers which define ioremap_wc() locally. These headers do not include <asm-generic/iomap.h>. Some of them include <asm-generic/io.h>, but ioremap_wt() is defined for consistency since they define all ioremap_xxx locally. In all architectures without Write-Through support, ioremap_wt() is defined indentical to ioremap_nocache(). frv and m68k already have ioremap_writethrough(). On those we add ioremap_wt() indetical to ioremap_writethrough() and defines ARCH_HAS_IOREMAP_WT in both architectures. The ioremap_wt() interface is exported to drivers. Signed-off-by: Toshi Kani <toshi.kani@hp.com> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Elliott@hp.com Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Luis R. Rodriguez <mcgrof@suse.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: arnd@arndb.de Cc: hch@lst.de Cc: hmh@hmh.eng.br Cc: jgross@suse.com Cc: konrad.wilk@oracle.com Cc: linux-mm <linux-mm@kvack.org> Cc: linux-nvdimm@lists.01.org Cc: stefan.bader@canonical.com Cc: yigal@plexistor.com Link: http://lkml.kernel.org/r/1433436928-31903-9-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-03-01sparc: io_64.h: Replace io function-link macrosRicardo Ribalda1-10/+10
Function like macros cannot be assigned to function pointers. This patch convert the function-like macros into object-macros, that the precompiler will replace with the name of the final function. With this patch this kind of code will work: if (priv->mode_big_endian) priv.read = ioread32be; else priv.read = ioread32; Same approach has been taken on asm-generic/io.h Reported-by: kbuild test robot <fengguang.wu@intel.com> Fixes: 99082eab63449f9d spi/xilinx: Remove iowrite/ioread wrappers Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-19sparc: io: remove duplicate relaxed accessors on sparc32Arnd Bergmann1-0/+6
Commit 1191ccb34cf8 ("sparc: io: implement dummy relaxed accessor macros for writes") added the relaxed accessors (readl_relaxed etc) in a file that is shared between sparc32 and sparc64. However, the earlier e1039fb42609 ("sparc32: introduce asm-generic/io.h") had already changed the sparc32 implementation to use asm-generic/io.h, which provides the same macros, resulting in lots of build errors. This moves the definitions from the shared sparc file into the sparc64-only file to fix the sparc32 build regression. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Fixes: 1191ccb34cf8 ("sparc: io: implement dummy relaxed accessor macros for writes")
2014-10-20sparc: io: implement dummy relaxed accessor macros for writesWill Deacon1-6/+2
write{b,w,l,q}_relaxed are implemented by some architectures in order to permit memory-mapped I/O accesses with weaker barrier semantics than the non-relaxed variants. This patch adds dummy macros for the write accessors to sparc, in the same vein as the dummy definitions for the relaxed read accessors. The existing relaxed read{b,w,l} accessors are moved into asm/io.h, since they are identical between 32-bit and 64-bit machines. Acked-by: "David S. Miller" <davem@davemloft.net> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
2014-07-21sparc64: avoid code duplication in io_64.hSam Ravnborg1-85/+15
Several of the small IO functions ended up having the same implementation. Use __raw_{read,write}* + {read,write}* as base for the others. Continue to use static inline functions to get full type check. The size of vmlinux for a defconfig build was the same when using static inline and macros for the functions - so there was no size win when using macros. This was tested with gcc 4.8.2 + binutils 2.24. For such simple constructs I assume older gcc's will do the same job. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-07-21sparc64: reorder functions in io_64.hSam Ravnborg1-114/+120
Reorder functions so __raw_{read,write}* functions comes first, followed by {read,write}* Update comments for the two blocks of functions. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-07-21sparc64: drop unused SLOW_DOWN_IO definitionsSam Ravnborg1-4/+0
They are no longer used. All hits in the kernel are essential unused code or comments Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-07-21sparc64: remove macro indirection in io_64.hSam Ravnborg1-89/+66
Most likely for historical reasons io_64.h used an extra layer of macro indirections. Fix it so we no longer use these indirections. In the process we loose a cast to the addr argument for in*()/out*() but all known affected users has already been fixed so no warnings are triggered. For each of the IO functions add a proper define like this: #define inb inb This is done to make the code compatible with the way these functions are defined in asm-generic/io.h with the objective to later introduce the generic io.h for sparc64. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-05-18sparc: drop use of extern for prototypes in arch/sparc/include/asmSam Ravnborg1-10/+10
Drop extern for all prototypes and adjust alignment of parameters as required after the removal. In a few rare cases adjust linelength to conform to maximum 80 chars, and likewise in a few rare cases adjust alignment of parameters to static functions. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-05-02sparc: move page_to_phys to page.hSam Ravnborg1-1/+0
Preparation for introducing asm-generic/io.h this move was required. In asm-generic page_to_phys is placed in page.h - so do the same here. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-28Disintegrate asm/system.h for SparcDavid Howells1-1/+0
Disintegrate asm/system.h for Sparc. Signed-off-by: David Howells <dhowells@redhat.com> cc: sparclinux@vger.kernel.org
2011-12-04sparc: switch to GENERIC_PCI_IOMAPMichael S. Tsirkin1-1/+1
sparc copied pci_iomap from generic code, probably to avoid pulling the rest of iomap.c in. Since that's in a separate file now, we can reuse the common implementation. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-27fbmem: fix fb_read, fb_write unaligned accessesJames Hogan1-0/+31
fb_{read,write} access the framebuffer using lots of fb_{read,write}l's but don't check that the file position is aligned which can cause problems on some architectures which do not support unaligned accesses. Since the operations are essentially memcpy_{from,to}io, new fb_memcpy_{from,to}fb macros have been defined and these are used instead. For Sparc, fb_{read,write} macros use sbus_{read,write}, so this defines new sbus_memcpy_{from,to}io functions the same as memcpy_{from,to}io but using sbus_{read,write}b instead of {read,write}b. Signed-off-by: James Hogan <james@albanarts.com> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-03sparc: Provide io{read,write}{16,32}be().David S. Miller1-0/+4
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29sparc: Kill sbus_ioremap() and sbus_iounmap().David S. Miller1-13/+0
No more users. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29sparc: Move SBUS DMA attribute interfaces out of asm/sbus.hDavid S. Miller1-0/+11
This is in preparation for the subsequent asm/sbus.h removal. Also, make these routines take a "struct device" or no arguments, as appropriate. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-27sparc, sparc64: use arch/sparc/includeSam Ravnborg1-0/+511
The majority of this patch was created by the following script: *** ASM=arch/sparc/include/asm mkdir -p $ASM git mv include/asm-sparc64/ftrace.h $ASM git rm include/asm-sparc64/* git mv include/asm-sparc/* $ASM sed -ie 's/asm-sparc64/asm/g' $ASM/* sed -ie 's/asm-sparc/asm/g' $ASM/* *** The rest was an update of the top-level Makefile to use sparc for header files when sparc64 is being build. And a small fixlet to pick up the correct unistd.h from sparc64 code. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>