]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ppc64: fix out_be64
authorAndrew Morton <akpm@osdl.org>
Mon, 14 Jun 2004 06:16:49 +0000 (23:16 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 14 Jun 2004 06:16:49 +0000 (23:16 -0700)
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>
include/asm-ppc64/io.h

index ed8139880fc5706c03b657d961deedbf33d88283..f6262bad7084790e0294822c82bf53077bb3f542 100644 (file)
@@ -307,7 +307,7 @@ static inline void out_le32(volatile unsigned *addr, int val)
 
 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 unsigned long *addr, unsigned long val)
                             : "=&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