powerpc: Reduce csum_add() complexity for PPC64
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Sat, 12 Feb 2022 07:36:17 +0000 (08:36 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 5 May 2022 14:00:20 +0000 (00:00 +1000)
commitf206fdd9d41bf7deb96219b8ca3499a5abd79b83
treec1ac749778f42033eb99894a1fb3c7803e6b69cb
parenta553476c44fb6bd3dc3a7e5efef8f130f0f34850
powerpc: Reduce csum_add() complexity for PPC64

PPC64 does everything in C, gcc is able to skip calculation
when one of the operands in zero.

Move the constant folding in PPC32 part.

This helps GCC and reduces ppc64_defconfig by 170 bytes.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/a4ca63dd4c4b09e1906d08fb814af5a41d0f3fcb.1644651363.git.christophe.leroy@csgroup.eu
arch/powerpc/include/asm/checksum.h