Home
last modified time | relevance | path

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

1234

/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/powerpc/include/asm/
Dchecksum.h26 int len, __wsum sum,
31 int len, __wsum sum, int *err_ptr);
34 int len, __wsum sum, int *err_ptr);
36 #define csum_partial_copy_nocheck(src, dst, len, sum) \ argument
37 csum_partial_copy_generic((src), (dst), (len), (sum), NULL, NULL)
44 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
49 __asm__("rlwinm %0,%1,16,0,31" : "=r" (tmp) : "r" (sum)); in csum_fold()
53 return (__force __sum16)(~((__force u32)sum + tmp) >> 16); in csum_fold()
66 __u8 proto, __wsum sum) in csum_tcpudp_nofold() argument
69 u64 s = (__force u32)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/m68k/include/asm/
Dchecksum.h23 __wsum csum_partial(const void *buff, int len, __wsum sum);
35 int len, __wsum sum,
40 __wsum sum);
48 unsigned int sum = 0; in ip_fast_csum() local
61 : "=d" (sum), "=&a" (iph), "=&d" (ihl), "=&d" (tmp) in ip_fast_csum()
62 : "0" (sum), "1" (iph), "2" (ihl) in ip_fast_csum()
64 return (__force __sum16)~sum; in ip_fast_csum()
67 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
69 unsigned int tmp = (__force u32)sum; in csum_fold()
75 : "=&d" (sum), "=&d" (tmp) in csum_fold()
[all …]
/arch/score/include/asm/
Dchecksum.h20 unsigned int csum_partial(const void *buff, int len, __wsum sum);
22 unsigned int sum, int *csum_err);
24 int len, unsigned int sum);
37 __wsum sum, int *err_ptr) in csum_and_copy_to_user() argument
39 sum = csum_partial(src, len, sum); in csum_and_copy_to_user()
44 return sum; in csum_and_copy_to_user()
53 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
72 : "=r" (sum) in csum_fold()
73 : "0" (sum)); in csum_fold()
74 return sum; in csum_fold()
[all …]
/arch/metag/include/asm/
Dchecksum.h17 extern __wsum csum_partial(const void *buff, int len, __wsum sum);
27 __wsum sum);
36 int len, __wsum sum, int *csum_err);
38 #define csum_partial_copy_nocheck(src, dst, len, sum) \ argument
39 csum_partial_copy((src), (dst), (len), (sum))
46 u32 sum = (__force u32)csum; in csum_fold() local
47 sum = (sum & 0xffff) + (sum >> 16); in csum_fold()
48 sum = (sum & 0xffff) + (sum >> 16); in csum_fold()
49 return (__force __sum16)~sum; in csum_fold()
64 __wsum sum) in csum_tcpudp_nofold() argument
[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.h34 void *dst, int len, __wsum sum, int *errp);
44 unsigned int sum; in ip_fast_csum() local
67 : "=r" (sum), "=r" (iph), "=r" (ihl) in ip_fast_csum()
71 return (__force __sum16)sum; in ip_fast_csum()
79 u32 sum = (__force u32)csum; in csum_fold() local
84 sum += (sum << 16) + (sum >> 16); in csum_fold()
85 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/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.h23 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
27 : "=r" (sum) in csum_fold()
28 : "r" ((__force u32)sum << 16), in csum_fold()
29 "0" ((__force u32)sum & 0xffff0000)); in csum_fold()
30 return (__force __sum16)(~(__force u32)sum >> 16); in csum_fold()
48 unsigned int sum; in ip_fast_csum() local
70 : "=r" (sum), "=r" (iph), "=r" (ihl) in ip_fast_csum()
73 return (__force __sum16)sum; in ip_fast_csum()
89 __u8 proto, __wsum sum) in csum_tcpudp_nofold() argument
95 : "=r" (sum) in csum_tcpudp_nofold()
[all …]
/arch/arm/include/asm/
Dchecksum.h27 __wsum csum_partial(const void *buff, int len, __wsum sum);
38 csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum);
41 csum_partial_copy_from_user(const void __user *src, void *dst, int len, __wsum sum, int *err_ptr);
46 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
50 : "=r" (sum) in csum_fold()
51 : "r" (sum) in csum_fold()
53 return (__force __sum16)(~(__force u32)sum >> 16); in csum_fold()
64 __wsum sum; in ip_fast_csum() local
81 : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (tmp1) in ip_fast_csum()
84 return csum_fold(sum); in ip_fast_csum()
[all …]
/arch/x86/um/asm/
Dchecksum.h21 extern __wsum csum_partial(const void *buff, int len, __wsum sum);
33 int len, __wsum sum) in csum_partial_copy_nocheck() argument
36 return csum_partial(dst, len, sum); in csum_partial_copy_nocheck()
49 int len, __wsum sum, int *err_ptr) in csum_partial_copy_from_user() argument
56 return csum_partial(dst, len, sum); in csum_partial_copy_from_user()
67 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
72 : "=r" (sum) in csum_fold()
73 : "r" ((__force u32)sum << 16), in csum_fold()
74 "0" ((__force u32)sum & 0xffff0000) in csum_fold()
76 return (__force __sum16)(~(__force u32)sum >> 16); in csum_fold()
[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/sparc/include/asm/
Dchecksum_64.h33 __wsum csum_partial(const void * buff, int len, __wsum sum);
42 int len, __wsum sum);
46 __wsum sum);
51 __wsum sum, int *err) in csum_partial_copy_from_user() argument
53 long ret = __csum_partial_copy_from_user(src, dst, len, sum); in csum_partial_copy_from_user()
65 __wsum sum);
70 __wsum sum, int *err) in csum_and_copy_to_user() argument
72 long ret = __csum_partial_copy_to_user(src, dst, len, sum); in csum_and_copy_to_user()
84 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
93 : "=&r" (sum), "=r" (tmp) in csum_fold()
[all …]
Dchecksum_32.h33 __wsum csum_partial(const void *buff, int len, __wsum sum);
45 csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum) in csum_partial_copy_nocheck() argument
55 : "0" (ret), "1" (d), "2" (l), "r" (sum) in csum_partial_copy_nocheck()
64 __wsum sum, int *err) in csum_partial_copy_from_user() argument
69 register __wsum s asm("g7") = sum; in csum_partial_copy_from_user()
88 __wsum sum, int *err) in csum_partial_copy_to_user() argument
92 return sum; in csum_partial_copy_to_user()
97 register __wsum s asm("g7") = sum; in csum_partial_copy_to_user()
124 __sum16 sum; in ip_fast_csum() local
152 : "=r" (sum), "=&r" (iph) 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/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/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()
42 __wsum sum) in csum_tcpudp_nofold() argument
[all …]
/arch/nios2/include/asm/
Dchecksum.h14 extern __wsum csum_partial(const void *buff, int len, __wsum sum);
16 __wsum sum);
18 int len, __wsum sum, int *csum_err);
19 #define csum_partial_copy_nocheck(src, dst, len, sum) \ argument
20 csum_partial_copy((src), (dst), (len), (sum))
28 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
36 : "=r" (sum) in csum_fold()
37 : "r" (sum << 16), "0" (sum) in csum_fold()
39 return (__force __sum16) sum; in csum_fold()
49 __wsum sum) in csum_tcpudp_nofold() argument
[all …]
/arch/arm64/include/asm/
Dchecksum.h23 u32 sum = (__force u32)csum; in csum_fold() local
24 sum += (sum >> 16) | (sum << 16); in csum_fold()
25 return ~(__force __sum16)(sum >> 16); in csum_fold()
32 u64 sum; in ip_fast_csum() local
38 sum = tmp >> 64; in ip_fast_csum()
40 sum += *(const u32 *)iph; in ip_fast_csum()
44 sum += ((sum >> 32) | (sum << 32)); in ip_fast_csum()
45 return csum_fold((__force u32)(sum >> 32)); in ip_fast_csum()
/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/alpha/include/asm/
Dchecksum.h18 __u32 len, __u8 proto, __wsum sum);
21 __u32 len, __u8 proto, __wsum sum);
35 extern __wsum csum_partial(const void *buff, int len, __wsum sum);
44 __wsum csum_partial_copy_from_user(const void __user *src, void *dst, int len, __wsum sum, int *err…
46 __wsum csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum);
62 u32 sum = (__force u32)csum; in csum_fold() local
63 sum = (sum & 0xffff) + (sum >> 16); in csum_fold()
64 sum = (sum & 0xffff) + (sum >> 16); in csum_fold()
65 return (__force __sum16)~sum; in csum_fold()
71 __u32 len, __u8 proto, __wsum sum);
/arch/cris/include/asm/
Dchecksum.h21 __wsum csum_partial(const void *buff, int len, __wsum sum);
32 int len, __wsum sum);
40 u32 sum = (__force u32)csum; in csum_fold() local
41 sum = (sum & 0xffff) + (sum >> 16); /* add in end-around carry */ in csum_fold()
42 sum = (sum & 0xffff) + (sum >> 16); /* add in end-around carry */ in csum_fold()
43 return (__force __sum16)~sum; in csum_fold()
47 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()

1234