Commit d56e8b5c authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc64: fix out_be64

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: default avatarRoland Dreier <roland@topspin.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
parent 1dadd0fc
...@@ -307,7 +307,7 @@ static inline void out_le32(volatile unsigned *addr, int val) ...@@ -307,7 +307,7 @@ static inline void out_le32(volatile unsigned *addr, int val)
static inline void out_be32(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)); : "=m" (*addr) : "r" (val));
} }
...@@ -356,9 +356,9 @@ static inline void out_le64(volatile unsigned long *addr, unsigned long 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)); : "=&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 #ifndef CONFIG_PPC_ISERIES
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment