diff options
author | Will Deacon <will.deacon@arm.com> | 2012-12-17 18:59:42 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-17 20:15:13 -0500 |
commit | 41739ee355abc39d36bde6feed32ad16c63ceea2 (patch) | |
tree | 9eec892c34b20a129a024fa3530e92ec7f8f7ace /include | |
parent | da01ee3c8e7954fb7ed0ceb002d482c79f8b2ccd (diff) |
asm-generic: io: don't perform swab during {in,out} string functions
The {in,out}s{b,w,l} functions are designed to operate on a stream of
bytes and therefore should not perform any byte-swapping, regardless of
the CPU byte order.
This patch fixes the generic IO header so that {in,out}s{b,w,l} call the
__raw_{read,write} functions directly rather than going via the
endian-correcting accessors.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Ben Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-generic/io.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index 9e0ebe051243..d1e93284d72a 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h | |||
@@ -154,7 +154,7 @@ static inline void insb(unsigned long addr, void *buffer, int count) | |||
154 | if (count) { | 154 | if (count) { |
155 | u8 *buf = buffer; | 155 | u8 *buf = buffer; |
156 | do { | 156 | do { |
157 | u8 x = inb(addr); | 157 | u8 x = __raw_readb(addr + PCI_IOBASE); |
158 | *buf++ = x; | 158 | *buf++ = x; |
159 | } while (--count); | 159 | } while (--count); |
160 | } | 160 | } |
@@ -167,7 +167,7 @@ static inline void insw(unsigned long addr, void *buffer, int count) | |||
167 | if (count) { | 167 | if (count) { |
168 | u16 *buf = buffer; | 168 | u16 *buf = buffer; |
169 | do { | 169 | do { |
170 | u16 x = inw(addr); | 170 | u16 x = __raw_readw(addr + PCI_IOBASE); |
171 | *buf++ = x; | 171 | *buf++ = x; |
172 | } while (--count); | 172 | } while (--count); |
173 | } | 173 | } |
@@ -180,7 +180,7 @@ static inline void insl(unsigned long addr, void *buffer, int count) | |||
180 | if (count) { | 180 | if (count) { |
181 | u32 *buf = buffer; | 181 | u32 *buf = buffer; |
182 | do { | 182 | do { |
183 | u32 x = inl(addr); | 183 | u32 x = __raw_readl(addr + PCI_IOBASE); |
184 | *buf++ = x; | 184 | *buf++ = x; |
185 | } while (--count); | 185 | } while (--count); |
186 | } | 186 | } |
@@ -193,7 +193,7 @@ static inline void outsb(unsigned long addr, const void *buffer, int count) | |||
193 | if (count) { | 193 | if (count) { |
194 | const u8 *buf = buffer; | 194 | const u8 *buf = buffer; |
195 | do { | 195 | do { |
196 | outb(*buf++, addr); | 196 | __raw_writeb(*buf++, addr + PCI_IOBASE); |
197 | } while (--count); | 197 | } while (--count); |
198 | } | 198 | } |
199 | } | 199 | } |
@@ -205,7 +205,7 @@ static inline void outsw(unsigned long addr, const void *buffer, int count) | |||
205 | if (count) { | 205 | if (count) { |
206 | const u16 *buf = buffer; | 206 | const u16 *buf = buffer; |
207 | do { | 207 | do { |
208 | outw(*buf++, addr); | 208 | __raw_writew(*buf++, addr + PCI_IOBASE); |
209 | } while (--count); | 209 | } while (--count); |
210 | } | 210 | } |
211 | } | 211 | } |
@@ -217,7 +217,7 @@ static inline void outsl(unsigned long addr, const void *buffer, int count) | |||
217 | if (count) { | 217 | if (count) { |
218 | const u32 *buf = buffer; | 218 | const u32 *buf = buffer; |
219 | do { | 219 | do { |
220 | outl(*buf++, addr); | 220 | __raw_writel(*buf++, addr + PCI_IOBASE); |
221 | } while (--count); | 221 | } while (--count); |
222 | } | 222 | } |
223 | } | 223 | } |