diff options
author | Bob Breuer <breuerr@mc.net> | 2007-02-02 12:52:15 -0800 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2007-02-05 08:31:44 -0800 |
commit | 594fb7bd8f3b317c531af7d00fb0967fb67e968d (patch) | |
tree | efa58a5e3843a24c5c02726a7dcdef213657658f | |
parent | 50d7d7e3c0ecbb01fc018434a23ec8b260c68473 (diff) |
[PATCH] SPARC32: Fix over-optimization by GCC near ip_fast_csum.
In some cases such as:
iph->check = 0;
iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl);
GCC may optimize out the previous store.
Observed as a failure of NFS over udp (bad checksums on ip fragments)
when compiled with GCC 3.4.2.
Signed-off-by: Bob Breuer <breuerr@mc.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
-rw-r--r-- | include/asm-sparc/checksum.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-sparc/checksum.h b/include/asm-sparc/checksum.h index 28615810897..acde719e001 100644 --- a/include/asm-sparc/checksum.h +++ b/include/asm-sparc/checksum.h @@ -159,7 +159,7 @@ static inline unsigned short ip_fast_csum(const unsigned char *iph, "xnor\t%%g0, %0, %0" : "=r" (sum), "=&r" (iph) : "r" (ihl), "1" (iph) - : "g2", "g3", "g4", "cc"); + : "g2", "g3", "g4", "cc", "memory"); return sum; } |