Skip to content

Commit

Permalink
endian-clean in_le64/out_le64
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Al Viro authored and Linus Torvalds committed Oct 14, 2007
1 parent b1519d0 commit bda76dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/asm-powerpc/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,12 @@ DEF_MMIO_IN_BE(in_be64, 64, ld);
/* There is no asm instructions for 64 bits reverse loads and stores */
static inline u64 in_le64(const volatile u64 __iomem *addr)
{
return le64_to_cpu(in_be64(addr));
return swab64(in_be64(addr));
}

static inline void out_le64(volatile u64 __iomem *addr, u64 val)
{
out_be64(addr, cpu_to_le64(val));
out_be64(addr, swab64(val));
}
#endif /* __powerpc64__ */

Expand Down

0 comments on commit bda76dd

Please sign in to comment.