mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 12:43:55 +08:00
6e41c585e3
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>
10 lines
240 B
C
10 lines
240 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#define _HAVE_ARCH_COPY_AND_CSUM_FROM_USER 1
|
|
#define HAVE_CSUM_COPY_USER
|
|
#define _HAVE_ARCH_CSUM_AND_COPY
|
|
#ifdef CONFIG_X86_32
|
|
# include <asm/checksum_32.h>
|
|
#else
|
|
# include <asm/checksum_64.h>
|
|
#endif
|