Home
last modified time | relevance | path

Searched refs:sum (Results 1 – 25 of 88) sorted by relevance

1234

/arch/score/include/asm/
Dchecksum.h19 unsigned int csum_partial(const void *buff, int len, __wsum sum);
21 unsigned int sum, int *csum_err);
23 int len, unsigned int sum);
36 __wsum sum, int *err_ptr) in csum_and_copy_to_user() argument
38 sum = csum_partial(src, len, sum); in csum_and_copy_to_user()
43 return sum; in csum_and_copy_to_user()
52 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
71 : "=r" (sum) in csum_fold()
72 : "0" (sum)); in csum_fold()
73 return sum; in csum_fold()
[all …]
/arch/arm/lib/
Dcsumpartialcopygeneric.S24 sum .req r3 label
26 .Lzero: mov r0, sum
41 adcs sum, sum, ip, put_byte_1 @ update checksum
48 adcs sum, sum, r8, put_byte_0
50 adcs sum, sum, ip, put_byte_1
68 adcs sum, sum, ip, put_byte_1 @ update checksum
75 adcs sum, sum, r8, put_byte_0
77 adcs sum, sum, ip, put_byte_1
86 adcs sum, sum, r8, put_byte_0 @ update checksum
96 adds sum, sum, #0 @ C = 0
[all …]
Dcsumpartial.S23 sum .req r2 label
29 .Lzero: mov r0, sum
42 movne sum, sum, ror #8
45 adcnes sum, sum, td0, put_byte_1
66 adcs sum, sum, td0
72 adcnes sum, sum, td0, put_byte_0 @ update checksum
74 .Ldone: adc r0, sum, #0 @ collect up the last carry
83 adcnes sum, sum, td0, put_byte_1 @ update checksum
99 adcnes sum, sum, td0 @ update checksum
108 movne sum, sum, ror #8
[all …]
/arch/m68k/include/asm/
Dchecksum.h22 __wsum csum_partial(const void *buff, int len, __wsum sum);
34 int len, __wsum sum,
39 __wsum sum);
47 unsigned int sum = 0; in ip_fast_csum() local
60 : "=d" (sum), "=&a" (iph), "=&d" (ihl), "=&d" (tmp) in ip_fast_csum()
61 : "0" (sum), "1" (iph), "2" (ihl) in ip_fast_csum()
63 return (__force __sum16)~sum; in ip_fast_csum()
66 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
68 unsigned int tmp = (__force u32)sum; in csum_fold()
74 : "=&d" (sum), "=&d" (tmp) in csum_fold()
[all …]
/arch/frv/include/asm/
Dchecksum.h29 __wsum csum_partial(const void *buff, int len, __wsum sum);
38 __wsum csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum);
47 int len, __wsum sum, int *csum_err);
57 unsigned int tmp, inc, sum = 0; in ip_fast_csum() local
75 : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (inc), "=&r"(tmp) in ip_fast_csum()
76 : "0" (sum), "1" (iph), "2" (ihl), "3" (4), in ip_fast_csum()
81 return (__force __sum16)~sum; in ip_fast_csum()
87 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
96 : "=r"(sum), "=&r"(tmp) in csum_fold()
97 : "0"(sum) in csum_fold()
[all …]
/arch/parisc/include/asm/
Dchecksum.h33 void *dst, int len, __wsum sum, int *errp);
43 unsigned int sum; in ip_fast_csum() local
66 : "=r" (sum), "=r" (iph), "=r" (ihl) in ip_fast_csum()
70 return (__force __sum16)sum; in ip_fast_csum()
78 u32 sum = (__force u32)csum; in csum_fold() local
83 sum += (sum << 16) + (sum >> 16); in csum_fold()
84 return (__force __sum16)(~sum >> 16); in csum_fold()
90 __wsum sum) in csum_tcpudp_nofold() argument
97 : "=r" (sum) in csum_tcpudp_nofold()
98 : "r" (daddr), "r"(saddr), "r"(proto+len), "0"(sum)); in csum_tcpudp_nofold()
[all …]
/arch/score/lib/
Dchecksum.S27 #define ADDC(sum,reg) \ argument
28 add sum, sum, reg; \
29 cmp.c reg, sum; \
31 addi sum, 0x1; \
34 #define CSUM_BIGCHUNK(src, offset, sum) \ argument
39 ADDC(sum, r8); \
40 ADDC(sum, r9); \
41 ADDC(sum, r10); \
42 ADDC(sum, r11); \
47 ADDC(sum, r8); \
[all …]
/arch/metag/include/asm/
Dchecksum.h16 extern __wsum csum_partial(const void *buff, int len, __wsum sum);
26 __wsum sum);
35 int len, __wsum sum, int *csum_err);
37 #define csum_partial_copy_nocheck(src, dst, len, sum) \ argument
38 csum_partial_copy((src), (dst), (len), (sum))
45 u32 sum = (__force u32)csum; in csum_fold() local
46 sum = (sum & 0xffff) + (sum >> 16); in csum_fold()
47 sum = (sum & 0xffff) + (sum >> 16); in csum_fold()
48 return (__force __sum16)~sum; in csum_fold()
64 __wsum sum) in csum_tcpudp_nofold() argument
[all …]
/arch/sh/include/asm/
Dchecksum_32.h26 asmlinkage __wsum csum_partial(const void *buff, int len, __wsum sum);
37 int len, __wsum sum,
49 int len, __wsum sum) in csum_partial_copy_nocheck() argument
51 return csum_partial_copy_generic(src, dst, len, sum, NULL, NULL); in csum_partial_copy_nocheck()
56 int len, __wsum sum, int *err_ptr) in csum_partial_copy_from_user() argument
59 len, sum, err_ptr, NULL); in csum_partial_copy_from_user()
66 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
76 : "=r" (sum), "=&r" (__dummy) in csum_fold()
77 : "0" (sum) in csum_fold()
79 return (__force __sum16)sum; in csum_fold()
[all …]
/arch/arm/include/asm/
Dchecksum.h26 __wsum csum_partial(const void *buff, int len, __wsum sum);
37 csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum);
40 csum_partial_copy_from_user(const void __user *src, void *dst, int len, __wsum sum, int *err_ptr);
45 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
49 : "=r" (sum) in csum_fold()
50 : "r" (sum) in csum_fold()
52 return (__force __sum16)(~(__force u32)sum >> 16); in csum_fold()
63 __wsum sum; in ip_fast_csum() local
80 : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (tmp1) in ip_fast_csum()
83 return csum_fold(sum); in ip_fast_csum()
[all …]
/arch/x86/um/asm/
Dchecksum.h19 extern __wsum csum_partial(const void *buff, int len, __wsum sum);
31 int len, __wsum sum) in csum_partial_copy_nocheck() argument
34 return csum_partial(dst, len, sum); in csum_partial_copy_nocheck()
47 int len, __wsum sum, int *err_ptr) in csum_partial_copy_from_user() argument
54 return csum_partial(dst, len, sum); in csum_partial_copy_from_user()
65 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
70 : "=r" (sum) in csum_fold()
71 : "r" ((__force u32)sum << 16), in csum_fold()
72 "0" ((__force u32)sum & 0xffff0000) in csum_fold()
74 return (__force __sum16)(~(__force u32)sum >> 16); in csum_fold()
[all …]
/arch/x86/include/asm/
Dchecksum_32.h20 asmlinkage __wsum csum_partial(const void *buff, int len, __wsum sum);
31 int len, __wsum sum,
42 int len, __wsum sum) in csum_partial_copy_nocheck() argument
44 return csum_partial_copy_generic(src, dst, len, sum, NULL, NULL); in csum_partial_copy_nocheck()
49 int len, __wsum sum, in csum_partial_copy_from_user() argument
57 len, sum, err_ptr, NULL); in csum_partial_copy_from_user()
72 unsigned int sum; in ip_fast_csum() local
94 : "=r" (sum), "=r" (iph), "=r" (ihl) in ip_fast_csum()
97 return (__force __sum16)sum; in ip_fast_csum()
104 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
[all …]
Dchecksum_64.h22 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
26 : "=r" (sum) in csum_fold()
27 : "r" ((__force u32)sum << 16), in csum_fold()
28 "0" ((__force u32)sum & 0xffff0000)); in csum_fold()
29 return (__force __sum16)(~(__force u32)sum >> 16); in csum_fold()
47 unsigned int sum; in ip_fast_csum() local
69 : "=r" (sum), "=r" (iph), "=r" (ihl) in ip_fast_csum()
72 return (__force __sum16)sum; in ip_fast_csum()
88 unsigned short proto, __wsum sum) in csum_tcpudp_nofold() argument
94 : "=r" (sum) in csum_tcpudp_nofold()
[all …]
/arch/avr32/include/asm/
Dchecksum.h23 __wsum csum_partial(const void *buff, int len, __wsum sum);
33 __wsum sum, int *src_err_ptr,
45 int len, __wsum sum) in csum_partial_copy_nocheck() argument
47 return csum_partial_copy_generic(src, dst, len, sum, NULL, NULL); in csum_partial_copy_nocheck()
52 int len, __wsum sum, int *err_ptr) in csum_partial_copy_from_user() argument
55 sum, err_ptr, NULL); in csum_partial_copy_from_user()
64 unsigned int sum, tmp; in ip_fast_csum() local
88 : "=r"(sum), "=r"(iph), "=r"(ihl), "=r"(tmp) in ip_fast_csum()
91 return (__force __sum16)sum; in ip_fast_csum()
98 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
[all …]
/arch/xtensa/include/asm/
Dchecksum.h30 asmlinkage __wsum csum_partial(const void *buff, int len, __wsum sum);
41 int len, __wsum sum,
52 int len, __wsum sum) in csum_partial_copy_nocheck() argument
54 return csum_partial_copy_generic(src, dst, len, sum, NULL, NULL); in csum_partial_copy_nocheck()
59 int len, __wsum sum, int *err_ptr) in csum_partial_copy_from_user() argument
62 len, sum, err_ptr, NULL); in csum_partial_copy_from_user()
69 static __inline__ __sum16 csum_fold(__wsum sum) in csum_fold() argument
81 : "=r" (sum), "=&r" (__dummy) in csum_fold()
82 : "0" (sum)); in csum_fold()
83 return (__force __sum16)sum; in csum_fold()
[all …]
/arch/mn10300/include/asm/
Dchecksum.h14 extern __wsum csum_partial(const void *buff, int len, __wsum sum);
16 int len, __wsum sum);
18 int len, __wsum sum,
21 extern __wsum csum_partial(const void *buff, int len, __wsum sum);
26 __wsum sum);
28 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
33 : "=r" (sum) in csum_fold()
34 : "r" (sum << 16), "0" (sum & 0xffff0000) in csum_fold()
37 return (~sum) >> 16; in csum_fold()
44 __wsum sum) in csum_tcpudp_nofold() argument
[all …]
/arch/sparc/include/asm/
Dchecksum_64.h32 __wsum csum_partial(const void * buff, int len, __wsum sum);
41 int len, __wsum sum);
45 __wsum sum);
50 __wsum sum, int *err) in csum_partial_copy_from_user() argument
52 long ret = __csum_partial_copy_from_user(src, dst, len, sum); in csum_partial_copy_from_user()
64 __wsum sum);
69 __wsum sum, int *err) in csum_and_copy_to_user() argument
71 long ret = __csum_partial_copy_to_user(src, dst, len, sum); in csum_and_copy_to_user()
83 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
92 : "=&r" (sum), "=r" (tmp) in csum_fold()
[all …]
Dchecksum_32.h32 __wsum csum_partial(const void *buff, int len, __wsum sum);
44 csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum) in csum_partial_copy_nocheck() argument
54 : "0" (ret), "1" (d), "2" (l), "r" (sum) in csum_partial_copy_nocheck()
63 __wsum sum, int *err) in csum_partial_copy_from_user() argument
68 register __wsum s asm("g7") = sum; in csum_partial_copy_from_user()
87 __wsum sum, int *err) in csum_partial_copy_to_user() argument
91 return sum; in csum_partial_copy_to_user()
96 register __wsum s asm("g7") = sum; in csum_partial_copy_to_user()
123 __sum16 sum; in ip_fast_csum() local
151 : "=r" (sum), "=&r" (iph) in ip_fast_csum()
[all …]
/arch/m32r/include/asm/
Dchecksum.h34 asmlinkage __wsum csum_partial(const void *buff, int len, __wsum sum);
43 int len, __wsum sum);
50 int len, __wsum sum,
57 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
68 : "=r" (sum), "=&r" (tmpreg) in csum_fold()
69 : "0" (sum) in csum_fold()
72 return (__force __sum16)sum; in csum_fold()
82 __wsum sum; in ip_fast_csum() local
109 : "=&r" (sum), "=r" (iph), "=r" (ihl), "=&r" (tmpreg0), "=&r" (tmpreg1) in ip_fast_csum()
113 return csum_fold(sum); in ip_fast_csum()
[all …]
/arch/mips/include/asm/
Dchecksum.h35 __wsum csum_partial(const void *buff, int len, __wsum sum);
38 int len, __wsum sum, int *err_ptr);
41 int len, __wsum sum, int *err_ptr);
43 int len, __wsum sum, int *err_ptr);
50 __wsum sum, int *err_ptr) in csum_partial_copy_from_user() argument
55 len, sum, err_ptr); in csum_partial_copy_from_user()
58 len, sum, err_ptr); in csum_partial_copy_from_user()
64 int len, __wsum sum, int *err_ptr) in csum_and_copy_from_user() argument
67 return csum_partial_copy_from_user(src, dst, len, sum, in csum_and_copy_from_user()
72 return sum; in csum_and_copy_from_user()
[all …]
/arch/alpha/include/asm/
Dchecksum.h19 __wsum sum);
23 __wsum sum);
37 extern __wsum csum_partial(const void *buff, int len, __wsum sum);
46 __wsum csum_partial_copy_from_user(const void __user *src, void *dst, int len, __wsum sum, int *err…
48 __wsum csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum);
64 u32 sum = (__force u32)csum; in csum_fold() local
65 sum = (sum & 0xffff) + (sum >> 16); in csum_fold()
66 sum = (sum & 0xffff) + (sum >> 16); in csum_fold()
67 return (__force __sum16)~sum; in csum_fold()
74 __wsum sum);
/arch/mn10300/lib/
Dchecksum.c19 static inline unsigned short from32to16(__wsum sum) in from32to16() argument
23 : "=r" (sum) in from32to16()
24 : "r" (sum << 16), "0" (sum & 0xffff0000) in from32to16()
27 return sum >> 16; in from32to16()
36 __wsum csum_partial(const void *buff, int len, __wsum sum) in csum_partial() argument
41 result += sum; in csum_partial()
42 if (sum > result) in csum_partial()
54 __wsum csum_partial_copy(const void *src, void *dst, int len, __wsum sum) in csum_partial_copy() argument
57 return csum_partial(dst, len, sum); in csum_partial_copy()
62 int len, __wsum sum) in csum_partial_copy_nocheck() argument
[all …]
/arch/cris/include/asm/
Dchecksum.h20 __wsum csum_partial(const void *buff, int len, __wsum sum);
31 int len, __wsum sum);
39 u32 sum = (__force u32)csum; in csum_fold() local
40 sum = (sum & 0xffff) + (sum >> 16); /* add in end-around carry */ in csum_fold()
41 sum = (sum & 0xffff) + (sum >> 16); /* add in end-around carry */ in csum_fold()
42 return (__force __sum16)~sum; in csum_fold()
46 int len, __wsum sum,
68 __wsum sum) in csum_tcpudp_magic() argument
70 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); in csum_tcpudp_magic()
/arch/powerpc/include/asm/
Dchecksum.h29 __wsum sum);
43 extern __wsum csum_partial(const void *buff, int len, __wsum sum);
56 int len, __wsum sum,
62 int len, __wsum sum, int *err_ptr);
65 int len, __wsum sum, int *err_ptr);
71 #define csum_partial_copy_from_user(src, dst, len, sum, errp) \ argument
72 csum_partial_copy_generic((__force const void *)(src), (dst), (len), (sum), (errp), NULL)
75 #define csum_partial_copy_nocheck(src, dst, len, sum) \ argument
76 csum_partial_copy_generic((src), (dst), (len), (sum), NULL, NULL)
83 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
[all …]
/arch/ia64/include/asm/
Dchecksum.h22 __wsum sum);
27 __wsum sum);
41 extern __wsum csum_partial(const void *buff, int len, __wsum sum);
50 int len, __wsum sum,
54 int len, __wsum sum);
67 u32 sum = (__force u32)csum; in csum_fold() local
68 sum = (sum & 0xffff) + (sum >> 16); in csum_fold()
69 sum = (sum & 0xffff) + (sum >> 16); in csum_fold()
70 return (__force __sum16)~sum; in csum_fold()

1234