diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2020-07-23 04:14:36 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2020-08-20 21:45:14 +0200 |
commit | 6e41c585e38ff696de3a11509a0ad0a11150b0c3 (patch) | |
tree | 6af77b846b7523063a645913fa6a2c6563beb238 /arch/sh | |
parent | icmp_push_reply(): reorder adding the checksum up (diff) | |
download | linux-6e41c585e38ff696de3a11509a0ad0a11150b0c3.tar.xz linux-6e41c585e38ff696de3a11509a0ad0a11150b0c3.zip |
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>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/include/asm/checksum_32.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/sh/include/asm/checksum_32.h b/arch/sh/include/asm/checksum_32.h index 91571a42e44e..87269642d78d 100644 --- a/arch/sh/include/asm/checksum_32.h +++ b/arch/sh/include/asm/checksum_32.h @@ -34,6 +34,7 @@ asmlinkage __wsum csum_partial_copy_generic(const void *src, void *dst, int len, __wsum sum, int *src_err_ptr, int *dst_err_ptr); +#define _HAVE_ARCH_CSUM_AND_COPY /* * Note: when you get a NULL pointer exception here this means someone * passed in an incorrect kernel address to one of these functions. |