
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Patch fixes out_be64 implementation on ppc64 along with a glich in out_be32
(inconsistent) use of barrier.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/include/asm-ppc64/io.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -puN include/asm-ppc64/io.h~ppc64-fix-out_be64 include/asm-ppc64/io.h
--- 25/include/asm-ppc64/io.h~ppc64-fix-out_be64	2004-06-13 21:07:31.662708560 -0700
+++ 25-akpm/include/asm-ppc64/io.h	2004-06-13 21:07:31.667707800 -0700
@@ -307,7 +307,7 @@ static inline void out_le32(volatile uns
 
 static inline void out_be32(volatile unsigned *addr, int val)
 {
-	__asm__ __volatile__("stw%U0%X0 %1,%0; eieio"
+	__asm__ __volatile__("stw%U0%X0 %1,%0; sync"
 			     : "=m" (*addr) : "r" (val));
 }
 
@@ -356,9 +356,9 @@ static inline void out_le64(volatile uns
 			     : "=&r" (tmp) , "=&r" (val) : "1" (val) , "b" (addr) , "m" (*addr));
 }
 
-static inline void out_be64(volatile unsigned long *addr, int val)
+static inline void out_be64(volatile unsigned long *addr, unsigned long val)
 {
-	__asm__ __volatile__("std %1,0(%0); sync" : "=m" (*addr) : "r" (val));
+	__asm__ __volatile__("std%U0%X0 %1,%0; sync" : "=m" (*addr) : "r" (val));
 }
 
 #ifndef CONFIG_PPC_ISERIES 
_
