unify generic instances of csum_partial_copy_nocheck()
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 23 Jul 2020 02:14:36 +0000 (22:14 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 20 Aug 2020 19:45:14 +0000 (15:45 -0400)
commit6e41c585e38ff696de3a11509a0ad0a11150b0c3
tree6af77b846b7523063a645913fa6a2c6563beb238
parent3ea7ca80d9c0ff606b5a129dce2354f771a9e4e8
unify generic instances of csum_partial_copy_nocheck()

quite a few architectures have the same csum_partial_copy_nocheck() -
simply memcpy() the data and then return the csum of the copy.

hexagon, parisc, ia64, s390, um: explicitly spelled out that way.

arc, arm64, csky, h8300, m68k/nommu, microblaze, mips/GENERIC_CSUM, nds32,
nios2, openrisc, riscv, unicore32: end up picking the same thing spelled
out in lib/checksum.h (with varying amounts of perversions along the way).

everybody else (alpha, arm, c6x, m68k/mmu, mips/!GENERIC_CSUM, powerpc,
sh, sparc, x86, xtensa) have non-generic variants.  For all except c6x
the declaration is in their asm/checksum.h.  c6x uses the wrapper
from asm-generic/checksum.h that would normally lead to the lib/checksum.h
instance, but in case of c6x we end up using an asm function from arch/c6x
instead.

Screw that mess - have architectures with private instances define
_HAVE_ARCH_CSUM_AND_COPY in their asm/checksum.h and have the default
one right in net/checksum.h conditional on _HAVE_ARCH_CSUM_AND_COPY
*not* defined.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
22 files changed:
arch/alpha/include/asm/checksum.h
arch/arm/include/asm/checksum.h
arch/c6x/include/asm/checksum.h
arch/hexagon/include/asm/checksum.h
arch/hexagon/lib/checksum.c
arch/ia64/include/asm/checksum.h
arch/ia64/lib/csum_partial_copy.c
arch/m68k/include/asm/checksum.h
arch/mips/include/asm/checksum.h
arch/nios2/include/asm/checksum.h
arch/parisc/include/asm/checksum.h
arch/parisc/lib/checksum.c
arch/powerpc/include/asm/checksum.h
arch/s390/include/asm/checksum.h
arch/sh/include/asm/checksum_32.h
arch/sparc/include/asm/checksum.h
arch/x86/include/asm/checksum.h
arch/x86/um/asm/checksum.h
arch/xtensa/include/asm/checksum.h
include/asm-generic/checksum.h
include/net/checksum.h
lib/checksum.c