| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | #ifndef _ASM_POWERPC_CHECKSUM_H |
|---|
| 2 | 3 | #define _ASM_POWERPC_CHECKSUM_H |
|---|
| 3 | 4 | #ifdef __KERNEL__ |
|---|
| 4 | 5 | |
|---|
| 5 | 6 | /* |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or |
|---|
| 7 | | - * modify it under the terms of the GNU General Public License |
|---|
| 8 | | - * as published by the Free Software Foundation; either version |
|---|
| 9 | | - * 2 of the License, or (at your option) any later version. |
|---|
| 10 | 7 | */ |
|---|
| 11 | 8 | |
|---|
| 12 | | -#ifdef CONFIG_GENERIC_CSUM |
|---|
| 13 | | -#include <asm-generic/checksum.h> |
|---|
| 14 | | -#else |
|---|
| 15 | 9 | #include <linux/bitops.h> |
|---|
| 16 | 10 | #include <linux/in6.h> |
|---|
| 17 | 11 | /* |
|---|
| .. | .. |
|---|
| 24 | 18 | * Like csum_partial, this must be called with even lengths, |
|---|
| 25 | 19 | * except for the last fragment. |
|---|
| 26 | 20 | */ |
|---|
| 27 | | -extern __wsum csum_partial_copy_generic(const void *src, void *dst, |
|---|
| 28 | | - int len, __wsum sum, |
|---|
| 29 | | - int *src_err, int *dst_err); |
|---|
| 21 | +extern __wsum csum_partial_copy_generic(const void *src, void *dst, int len); |
|---|
| 30 | 22 | |
|---|
| 31 | 23 | #define _HAVE_ARCH_COPY_AND_CSUM_FROM_USER |
|---|
| 32 | 24 | extern __wsum csum_and_copy_from_user(const void __user *src, void *dst, |
|---|
| 33 | | - int len, __wsum sum, int *err_ptr); |
|---|
| 25 | + int len); |
|---|
| 34 | 26 | #define HAVE_CSUM_COPY_USER |
|---|
| 35 | 27 | extern __wsum csum_and_copy_to_user(const void *src, void __user *dst, |
|---|
| 36 | | - int len, __wsum sum, int *err_ptr); |
|---|
| 28 | + int len); |
|---|
| 37 | 29 | |
|---|
| 38 | | -#define csum_partial_copy_nocheck(src, dst, len, sum) \ |
|---|
| 39 | | - csum_partial_copy_generic((src), (dst), (len), (sum), NULL, NULL) |
|---|
| 30 | +#define _HAVE_ARCH_CSUM_AND_COPY |
|---|
| 31 | +#define csum_partial_copy_nocheck(src, dst, len) \ |
|---|
| 32 | + csum_partial_copy_generic((src), (dst), (len)) |
|---|
| 40 | 33 | |
|---|
| 41 | 34 | |
|---|
| 42 | 35 | /* |
|---|
| .. | .. |
|---|
| 217 | 210 | const struct in6_addr *daddr, |
|---|
| 218 | 211 | __u32 len, __u8 proto, __wsum sum); |
|---|
| 219 | 212 | |
|---|
| 220 | | -#endif |
|---|
| 221 | 213 | #endif /* __KERNEL__ */ |
|---|
| 222 | 214 | #endif |
|---|