aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-09 20:25:00 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-09 20:25:00 -0500
commita0e4467726cd26bacb16f13d207ffcfa82ffc07d (patch)
tree98b5fcbda0cd787b07d09da90d25c87b3883c567 /arch/sparc
parented8efd2de75479a175bd21df073d9e97df65a820 (diff)
parentcb61f6769b8836081940ba26249f1b756400c7df (diff)
Merge tag 'asm-generic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic
Pull asm-generic asm/io.h rewrite from Arnd Bergmann: "While there normally is no reason to have a pull request for asm-generic but have all changes get merged through whichever tree needs them, I do have a series for 3.19. There are two sets of patches that change significant portions of asm/io.h, and this branch contains both in order to resolve the conflicts: - Will Deacon has done a set of patches to ensure that all architectures define {read,write}{b,w,l,q}_relaxed() functions or get them by including asm-generic/io.h. These functions are commonly used on ARM specific drivers to avoid expensive L2 cache synchronization implied by the normal {read,write}{b,w,l,q}, but we need to define them on all architectures in order to share the drivers across architectures and to enable CONFIG_COMPILE_TEST configurations for them - Thierry Reding has done an unrelated set of patches that extends the asm-generic/io.h file to the degree necessary to make it useful on ARM64 and potentially other architectures" * tag 'asm-generic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: (29 commits) ARM64: use GENERIC_PCI_IOMAP sparc: io: remove duplicate relaxed accessors on sparc32 ARM: sa11x0: Use void __iomem * in MMIO accessors arm64: Use include/asm-generic/io.h ARM: Use include/asm-generic/io.h asm-generic/io.h: Implement generic {read,write}s*() asm-generic/io.h: Reconcile I/O accessor overrides /dev/mem: Use more consistent data types Change xlate_dev_{kmem,mem}_ptr() prototypes ARM: ixp4xx: Properly override I/O accessors ARM: ixp4xx: Fix build with IXP4XX_INDIRECT_PCI ARM: ebsa110: Properly override I/O accessors ARC: Remove redundant PCI_IOBASE declaration documentation: memory-barriers: clarify relaxed io accessor semantics x86: io: implement dummy relaxed accessor macros for writes tile: io: implement dummy relaxed accessor macros for writes sparc: io: implement dummy relaxed accessor macros for writes powerpc: io: implement dummy relaxed accessor macros for writes parisc: io: implement dummy relaxed accessor macros for writes mn10300: io: implement dummy relaxed accessor macros for writes ...
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/include/asm/io_32.h4
-rw-r--r--arch/sparc/include/asm/io_64.h14
2 files changed, 8 insertions, 10 deletions
diff --git a/arch/sparc/include/asm/io_32.h b/arch/sparc/include/asm/io_32.h
index 9f532902627c..407ac14295f4 100644
--- a/arch/sparc/include/asm/io_32.h
+++ b/arch/sparc/include/asm/io_32.h
@@ -4,10 +4,6 @@
4#include <linux/kernel.h> 4#include <linux/kernel.h>
5#include <linux/ioport.h> /* struct resource */ 5#include <linux/ioport.h> /* struct resource */
6 6
7#define readb_relaxed(__addr) readb(__addr)
8#define readw_relaxed(__addr) readw(__addr)
9#define readl_relaxed(__addr) readl(__addr)
10
11#define IO_SPACE_LIMIT 0xffffffff 7#define IO_SPACE_LIMIT 0xffffffff
12 8
13#define memset_io(d,c,sz) _memset_io(d,c,sz) 9#define memset_io(d,c,sz) _memset_io(d,c,sz)
diff --git a/arch/sparc/include/asm/io_64.h b/arch/sparc/include/asm/io_64.h
index 80b54b326d49..9b672be70dda 100644
--- a/arch/sparc/include/asm/io_64.h
+++ b/arch/sparc/include/asm/io_64.h
@@ -101,6 +101,7 @@ static inline void __raw_writeq(u64 q, const volatile void __iomem *addr)
101 * the cache by using ASI_PHYS_BYPASS_EC_E_L 101 * the cache by using ASI_PHYS_BYPASS_EC_E_L
102 */ 102 */
103#define readb readb 103#define readb readb
104#define readb_relaxed readb
104static inline u8 readb(const volatile void __iomem *addr) 105static inline u8 readb(const volatile void __iomem *addr)
105{ u8 ret; 106{ u8 ret;
106 107
@@ -112,6 +113,7 @@ static inline u8 readb(const volatile void __iomem *addr)
112} 113}
113 114
114#define readw readw 115#define readw readw
116#define readw_relaxed readw
115static inline u16 readw(const volatile void __iomem *addr) 117static inline u16 readw(const volatile void __iomem *addr)
116{ u16 ret; 118{ u16 ret;
117 119
@@ -124,6 +126,7 @@ static inline u16 readw(const volatile void __iomem *addr)
124} 126}
125 127
126#define readl readl 128#define readl readl
129#define readl_relaxed readl
127static inline u32 readl(const volatile void __iomem *addr) 130static inline u32 readl(const volatile void __iomem *addr)
128{ u32 ret; 131{ u32 ret;
129 132
@@ -136,6 +139,7 @@ static inline u32 readl(const volatile void __iomem *addr)
136} 139}
137 140
138#define readq readq 141#define readq readq
142#define readq_relaxed readq
139static inline u64 readq(const volatile void __iomem *addr) 143static inline u64 readq(const volatile void __iomem *addr)
140{ u64 ret; 144{ u64 ret;
141 145
@@ -148,6 +152,7 @@ static inline u64 readq(const volatile void __iomem *addr)
148} 152}
149 153
150#define writeb writeb 154#define writeb writeb
155#define writeb_relaxed writeb
151static inline void writeb(u8 b, volatile void __iomem *addr) 156static inline void writeb(u8 b, volatile void __iomem *addr)
152{ 157{
153 __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_writeb */" 158 __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_writeb */"
@@ -157,6 +162,7 @@ static inline void writeb(u8 b, volatile void __iomem *addr)
157} 162}
158 163
159#define writew writew 164#define writew writew
165#define writew_relaxed writew
160static inline void writew(u16 w, volatile void __iomem *addr) 166static inline void writew(u16 w, volatile void __iomem *addr)
161{ 167{
162 __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_writew */" 168 __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_writew */"
@@ -166,6 +172,7 @@ static inline void writew(u16 w, volatile void __iomem *addr)
166} 172}
167 173
168#define writel writel 174#define writel writel
175#define writel_relaxed writel
169static inline void writel(u32 l, volatile void __iomem *addr) 176static inline void writel(u32 l, volatile void __iomem *addr)
170{ 177{
171 __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_writel */" 178 __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_writel */"
@@ -175,6 +182,7 @@ static inline void writel(u32 l, volatile void __iomem *addr)
175} 182}
176 183
177#define writeq writeq 184#define writeq writeq
185#define writeq_relaxed writeq
178static inline void writeq(u64 q, volatile void __iomem *addr) 186static inline void writeq(u64 q, volatile void __iomem *addr)
179{ 187{
180 __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* pci_writeq */" 188 __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* pci_writeq */"
@@ -183,7 +191,6 @@ static inline void writeq(u64 q, volatile void __iomem *addr)
183 : "memory"); 191 : "memory");
184} 192}
185 193
186
187#define inb inb 194#define inb inb
188static inline u8 inb(unsigned long addr) 195static inline u8 inb(unsigned long addr)
189{ 196{
@@ -264,11 +271,6 @@ static inline void iowrite32_rep(void __iomem *port, const void *buf, unsigned l
264 outsl((unsigned long __force)port, buf, count); 271 outsl((unsigned long __force)port, buf, count);
265} 272}
266 273
267#define readb_relaxed(__addr) readb(__addr)
268#define readw_relaxed(__addr) readw(__addr)
269#define readl_relaxed(__addr) readl(__addr)
270#define readq_relaxed(__addr) readq(__addr)
271
272/* Valid I/O Space regions are anywhere, because each PCI bus supported 274/* Valid I/O Space regions are anywhere, because each PCI bus supported
273 * can live in an arbitrary area of the physical address range. 275 * can live in an arbitrary area of the physical address range.
274 */ 276 */