aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2007-10-14 14:35:00 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-14 15:41:51 -0400
commitbda76dd1600cc32a753bb9ae45dbe1d625aba92a (patch)
tree044ee1df58bc19c67942401c1a85917c3c4bfb14 /include
parentb1519d047ca55406e0fc3dd2b8de266f971ea210 (diff)
endian-clean in_le64/out_le64
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-powerpc/io.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h
index affba7052fb6..0d0589ef8ea6 100644
--- a/include/asm-powerpc/io.h
+++ b/include/asm-powerpc/io.h
@@ -138,12 +138,12 @@ DEF_MMIO_IN_BE(in_be64, 64, ld);
138/* There is no asm instructions for 64 bits reverse loads and stores */ 138/* There is no asm instructions for 64 bits reverse loads and stores */
139static inline u64 in_le64(const volatile u64 __iomem *addr) 139static inline u64 in_le64(const volatile u64 __iomem *addr)
140{ 140{
141 return le64_to_cpu(in_be64(addr)); 141 return swab64(in_be64(addr));
142} 142}
143 143
144static inline void out_le64(volatile u64 __iomem *addr, u64 val) 144static inline void out_le64(volatile u64 __iomem *addr, u64 val)
145{ 145{
146 out_be64(addr, cpu_to_le64(val)); 146 out_be64(addr, swab64(val));
147} 147}
148#endif /* __powerpc64__ */ 148#endif /* __powerpc64__ */
149 149