aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/include
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2014-11-19 04:15:33 -0500
committerArnd Bergmann <arnd@arndb.de>2014-11-19 04:19:45 -0500
commit7c3969c3a4f3593bf7963355e10401a8638cb1cb (patch)
tree02fe65202718b5c7ff2421cfff2e1431a8fe3713 /arch/sparc/include
parent1c8d29696f0d79902962526d6c54ebfeb842c61d (diff)
sparc: io: remove duplicate relaxed accessors on sparc32
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")
Diffstat (limited to 'arch/sparc/include')
-rw-r--r--arch/sparc/include/asm/io.h9
-rw-r--r--arch/sparc/include/asm/io_64.h6
2 files changed, 6 insertions, 9 deletions
diff --git a/arch/sparc/include/asm/io.h b/arch/sparc/include/asm/io.h
index 493f22c4684f..f6902cf3cbe9 100644
--- a/arch/sparc/include/asm/io.h
+++ b/arch/sparc/include/asm/io.h
@@ -10,15 +10,6 @@
10 * Defines used for both SPARC32 and SPARC64 10 * Defines used for both SPARC32 and SPARC64
11 */ 11 */
12 12
13/* Relaxed accessors for MMIO */
14#define readb_relaxed(__addr) readb(__addr)
15#define readw_relaxed(__addr) readw(__addr)
16#define readl_relaxed(__addr) readl(__addr)
17
18#define writeb_relaxed(__b, __addr) writeb(__b, __addr)
19#define writew_relaxed(__w, __addr) writew(__w, __addr)
20#define writel_relaxed(__l, __addr) writel(__l, __addr)
21
22/* Big endian versions of memory read/write routines */ 13/* Big endian versions of memory read/write routines */
23#define readb_be(__addr) __raw_readb(__addr) 14#define readb_be(__addr) __raw_readb(__addr)
24#define readw_be(__addr) __raw_readw(__addr) 15#define readw_be(__addr) __raw_readw(__addr)
diff --git a/arch/sparc/include/asm/io_64.h b/arch/sparc/include/asm/io_64.h
index d50e6127325d..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
@@ -149,6 +152,7 @@ static inline u64 readq(const volatile void __iomem *addr)
149} 152}
150 153
151#define writeb writeb 154#define writeb writeb
155#define writeb_relaxed writeb
152static inline void writeb(u8 b, volatile void __iomem *addr) 156static inline void writeb(u8 b, volatile void __iomem *addr)
153{ 157{
154 __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_writeb */" 158 __asm__ __volatile__("stba\t%r0, [%1] %2\t/* pci_writeb */"
@@ -158,6 +162,7 @@ static inline void writeb(u8 b, volatile void __iomem *addr)
158} 162}
159 163
160#define writew writew 164#define writew writew
165#define writew_relaxed writew
161static inline void writew(u16 w, volatile void __iomem *addr) 166static inline void writew(u16 w, volatile void __iomem *addr)
162{ 167{
163 __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_writew */" 168 __asm__ __volatile__("stha\t%r0, [%1] %2\t/* pci_writew */"
@@ -167,6 +172,7 @@ static inline void writew(u16 w, volatile void __iomem *addr)
167} 172}
168 173
169#define writel writel 174#define writel writel
175#define writel_relaxed writel
170static inline void writel(u32 l, volatile void __iomem *addr) 176static inline void writel(u32 l, volatile void __iomem *addr)
171{ 177{
172 __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_writel */" 178 __asm__ __volatile__("stwa\t%r0, [%1] %2\t/* pci_writel */"