summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/checksum.h
diff options
context:
space:
mode:
authorShile Zhang <shile.zhang@nokia.com>2017-02-04 10:03:40 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2017-03-04 13:07:17 +0100
commit6ad966d7303b70165228dba1ee8da1a05c10eefe (patch)
tree7b8d63bfd8f1da863a27198b5b73af448a0656ad /arch/powerpc/include/asm/checksum.h
parentpowerpc/powernv: Fix opal tracepoints with JUMP_LABEL=n (diff)
downloadlinux-6ad966d7303b70165228dba1ee8da1a05c10eefe.tar.xz
linux-6ad966d7303b70165228dba1ee8da1a05c10eefe.zip
powerpc/64: Fix checksum folding in csum_add()
Paul's patch to fix checksum folding, commit b492f7e4e07a ("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 <shile.zhang@nokia.com> Acked-by: Paul Mackerras <paulus@ozlabs.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/checksum.h')
-rw-r--r--arch/powerpc/include/asm/checksum.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/checksum.h b/arch/powerpc/include/asm/checksum.h
index 4e63787dc3be..842124b199b5 100644
--- a/arch/powerpc/include/asm/checksum.h
+++ b/arch/powerpc/include/asm/checksum.h
@@ -112,7 +112,7 @@ static inline __wsum csum_add(__wsum csum, __wsum addend)
#ifdef __powerpc64__
res += (__force u64)addend;
- return (__force __wsum)((u32)res + (res >> 32));
+ return (__force __wsum) from64to32(res);
#else
asm("addc %0,%0,%1;"
"addze %0,%0;"