diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2014-11-11 13:55:45 -0500 |
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2014-11-11 13:55:45 -0500 |
| commit | 1c8d29696f0d79902962526d6c54ebfeb842c61d (patch) | |
| tree | 047caddef4ee91e42002bc1234d273c6fbc54967 /arch/sparc/include/asm | |
| parent | 3ba5acf368ae415cd14d026b7cfe29de942b65fc (diff) | |
| parent | a8e0aead70b4af957e6b27b82fba849c6179b707 (diff) | |
Merge branch 'io' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into asm-generic
* 'io' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux:
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
m68k: io: implement dummy relaxed accessor macros for writes
m32r: io: implement dummy relaxed accessor macros for writes
ia64: io: implement dummy relaxed accessor macros for writes
cris: io: implement dummy relaxed accessor macros for writes
frv: io: implement dummy relaxed accessor macros for writes
xtensa: io: remove dummy relaxed accessor macros for reads
s390: io: remove dummy relaxed accessor macros for reads
microblaze: io: remove dummy relaxed accessor macros
asm-generic: io: implement relaxed accessor macros as conditional wrappers
Conflicts:
include/asm-generic/io.h
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/sparc/include/asm')
| -rw-r--r-- | arch/sparc/include/asm/io.h | 9 | ||||
| -rw-r--r-- | arch/sparc/include/asm/io_32.h | 4 | ||||
| -rw-r--r-- | arch/sparc/include/asm/io_64.h | 8 |
3 files changed, 11 insertions, 10 deletions
diff --git a/arch/sparc/include/asm/io.h b/arch/sparc/include/asm/io.h index f6902cf3cbe9..493f22c4684f 100644 --- a/arch/sparc/include/asm/io.h +++ b/arch/sparc/include/asm/io.h | |||
| @@ -10,6 +10,15 @@ | |||
| 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 | |||
| 13 | /* Big endian versions of memory read/write routines */ | 22 | /* Big endian versions of memory read/write routines */ |
| 14 | #define readb_be(__addr) __raw_readb(__addr) | 23 | #define readb_be(__addr) __raw_readb(__addr) |
| 15 | #define readw_be(__addr) __raw_readw(__addr) | 24 | #define readw_be(__addr) __raw_readw(__addr) |
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..d50e6127325d 100644 --- a/arch/sparc/include/asm/io_64.h +++ b/arch/sparc/include/asm/io_64.h | |||
| @@ -136,6 +136,7 @@ static inline u32 readl(const volatile void __iomem *addr) | |||
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | #define readq readq | 138 | #define readq readq |
| 139 | #define readq_relaxed readq | ||
| 139 | static inline u64 readq(const volatile void __iomem *addr) | 140 | static inline u64 readq(const volatile void __iomem *addr) |
| 140 | { u64 ret; | 141 | { u64 ret; |
| 141 | 142 | ||
| @@ -175,6 +176,7 @@ static inline void writel(u32 l, volatile void __iomem *addr) | |||
| 175 | } | 176 | } |
| 176 | 177 | ||
| 177 | #define writeq writeq | 178 | #define writeq writeq |
| 179 | #define writeq_relaxed writeq | ||
| 178 | static inline void writeq(u64 q, volatile void __iomem *addr) | 180 | static inline void writeq(u64 q, volatile void __iomem *addr) |
| 179 | { | 181 | { |
| 180 | __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* pci_writeq */" | 182 | __asm__ __volatile__("stxa\t%r0, [%1] %2\t/* pci_writeq */" |
| @@ -183,7 +185,6 @@ static inline void writeq(u64 q, volatile void __iomem *addr) | |||
| 183 | : "memory"); | 185 | : "memory"); |
| 184 | } | 186 | } |
| 185 | 187 | ||
| 186 | |||
| 187 | #define inb inb | 188 | #define inb inb |
| 188 | static inline u8 inb(unsigned long addr) | 189 | static inline u8 inb(unsigned long addr) |
| 189 | { | 190 | { |
| @@ -264,11 +265,6 @@ static inline void iowrite32_rep(void __iomem *port, const void *buf, unsigned l | |||
| 264 | outsl((unsigned long __force)port, buf, count); | 265 | outsl((unsigned long __force)port, buf, count); |
| 265 | } | 266 | } |
| 266 | 267 | ||
| 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 | 268 | /* Valid I/O Space regions are anywhere, because each PCI bus supported |
| 273 | * can live in an arbitrary area of the physical address range. | 269 | * can live in an arbitrary area of the physical address range. |
| 274 | */ | 270 | */ |
