Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Subject | Re: [PATCH] Fix ppc64 out_be64 | From | Benjamin Herrenschmidt <> | Date | Sun, 13 Jun 2004 12:11:23 -0500 |
| |
> Yes, that looks fine (after fixing val to be unsigned long in > out_be64). You know infinitely more about ppc64 asm than I do so I'm > sure your version is better.
Well, I may know ppc asm, but gcc inline asm still drives me nuts :)
Here's a fixed version (Andrew, please apply)
----
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>
===== include/asm-ppc64/io.h 1.18 vs edited ===== --- 1.18/include/asm-ppc64/io.h 2004-05-21 02:50:11 -05:00 +++ edited/include/asm-ppc64/io.h 2004-06-13 12:09:16 -05:00 @@ -307,7 +307,7 @@ 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 @@ : "=&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
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |