Skip to content

Commit 6ad966d

Browse files
Shile Zhangmpe
authored andcommitted
powerpc/64: Fix checksum folding in csum_add()
Paul's patch to fix checksum folding, commit b492f7e ("powerpc/64: Fix checksum folding in csum_tcpudp_nofold and ip_fast_csum_nofold") missed a case in csum_add(). Fix it. Signed-off-by: Shile Zhang <[email protected]> Acked-by: Paul Mackerras <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent 2a9c4f4 commit 6ad966d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/powerpc/include/asm/checksum.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static inline __wsum csum_add(__wsum csum, __wsum addend)
112112

113113
#ifdef __powerpc64__
114114
res += (__force u64)addend;
115-
return (__force __wsum)((u32)res + (res >> 32));
115+
return (__force __wsum) from64to32(res);
116116
#else
117117
asm("addc %0,%0,%1;"
118118
"addze %0,%0;"

0 commit comments

Comments
 (0)