Commit 4ff61ecf authored by Bob Breuer's avatar Bob Breuer Committed by Adrian Bunk

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: default avatarBob Breuer <breuerr@mc.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
parent 50c6a34d
......@@ -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;
}
......
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