Home
last modified time | relevance | path

Searched full:sum (Results 1 – 25 of 964) sorted by relevance

12345678910>>...39

/Linux-v6.1/arch/arm/lib/
Dcsumpartialcopygeneric.S11 * csum_partial_copy_xxx(const char *src, char *dst, int len, int sum, )
12 * r0 = src, r1 = dst, r2 = len, r3 = sum
21 sum .req r3 label
23 .Lzero: mov r0, sum
38 adcs sum, sum, ip, put_byte_1 @ update checksum
45 adcs sum, sum, r8, put_byte_0
47 adcs sum, sum, ip, put_byte_1
65 adcs sum, sum, ip, put_byte_1 @ update checksum
72 adcs sum, sum, r8, put_byte_0
74 adcs sum, sum, ip, put_byte_1
[all …]
Dcsumpartial.S13 * Function: __u32 csum_partial(const char *src, int len, __u32 sum)
20 sum .req r2 label
26 .Lzero: mov r0, sum
39 movne sum, sum, ror #8
42 adcsne sum, sum, td0, put_byte_1
63 adcs sum, sum, td0
69 adcsne sum, sum, td0, put_byte_0 @ update checksum
71 .Ldone: adc r0, sum, #0 @ collect up the last carry
80 adcsne sum, sum, td0, put_byte_1 @ update checksum
96 adcsne sum, sum, td0 @ update checksum
[all …]
/Linux-v6.1/arch/powerpc/include/asm/
Dchecksum.h13 * and adds in "sum" (32-bit), while copying the block to dst.
39 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
41 u32 tmp = (__force u32)sum; in csum_fold()
44 * swap the two 16-bit halves of sum in csum_fold()
47 * giving us the correct sum in the upper half. in csum_fold()
58 __u8 proto, __wsum sum) in csum_tcpudp_nofold() argument
61 u64 s = (__force u32)sum; in csum_tcpudp_nofold()
78 : "=r" (sum) in csum_tcpudp_nofold()
79 : "r" (daddr), "r"(saddr), "r"(proto + len), "0"(sum)); in csum_tcpudp_nofold()
80 return sum; in csum_tcpudp_nofold()
[all …]
/Linux-v6.1/sound/pci/ctxfi/
Dctamixer.c91 static int amixer_set_sum(struct amixer *amixer, struct sum *sum) in amixer_set_sum() argument
96 amixer->sum = sum; in amixer_set_sum()
97 if (!sum) { in amixer_set_sum()
102 sum->rsc.ops->index(&sum->rsc)); in amixer_set_sum()
114 struct sum *sum; in amixer_commit_write() local
118 sum = amixer->sum; in amixer_commit_write()
125 if (sum) in amixer_commit_write()
126 sum->rsc.ops->master(&sum->rsc); in amixer_commit_write()
135 if (sum) { in amixer_commit_write()
137 sum->rsc.ops->index(&sum->rsc)); in amixer_commit_write()
[all …]
/Linux-v6.1/net/ipv6/
Dip6_checksum.c16 __u32 sum = (__force u32)csum; in csum_ipv6_magic() local
18 sum += (__force u32)saddr->s6_addr32[0]; in csum_ipv6_magic()
19 carry = (sum < (__force u32)saddr->s6_addr32[0]); in csum_ipv6_magic()
20 sum += carry; in csum_ipv6_magic()
22 sum += (__force u32)saddr->s6_addr32[1]; in csum_ipv6_magic()
23 carry = (sum < (__force u32)saddr->s6_addr32[1]); in csum_ipv6_magic()
24 sum += carry; in csum_ipv6_magic()
26 sum += (__force u32)saddr->s6_addr32[2]; in csum_ipv6_magic()
27 carry = (sum < (__force u32)saddr->s6_addr32[2]); in csum_ipv6_magic()
28 sum += carry; in csum_ipv6_magic()
[all …]
/Linux-v6.1/arch/mips/lib/
Dcsum_partial.S59 #define ADDC(sum,reg) \ argument
62 ADD sum, reg; \
63 sltu v1, sum, reg; \
64 ADD sum, v1; \
67 #define ADDC32(sum,reg) \ argument
70 addu sum, reg; \
71 sltu v1, sum, reg; \
72 addu sum, v1; \
75 #define CSUM_BIGCHUNK1(src, offset, sum, _t0, _t1, _t2, _t3) \ argument
82 ADDC(sum, _t0); \
[all …]
/Linux-v6.1/arch/s390/include/asm/
Dchecksum.h20 * and adds in "sum" (32-bit).
30 static inline __wsum csum_partial(const void *buff, int len, __wsum sum) in csum_partial() argument
38 "0: cksm %[sum],%[rp]\n" in csum_partial()
40 : [sum] "+&d" (sum), [rp] "+&d" (rp.pair) : : "cc", "memory"); in csum_partial()
41 return sum; in csum_partial()
47 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
49 u32 csum = (__force u32) sum; in csum_fold()
81 __u8 proto, __wsum sum) in csum_tcpudp_nofold() argument
83 __u64 csum = (__force __u64)sum; in csum_tcpudp_nofold()
98 __u8 proto, __wsum sum) in csum_tcpudp_magic() argument
[all …]
/Linux-v6.1/crypto/
Dtea.c59 u32 y, z, n, sum = 0; in tea_encrypt() local
76 sum += TEA_DELTA; in tea_encrypt()
77 y += ((z << 4) + k0) ^ (z + sum) ^ ((z >> 5) + k1); in tea_encrypt()
78 z += ((y << 4) + k2) ^ (y + sum) ^ ((y >> 5) + k3); in tea_encrypt()
87 u32 y, z, n, sum; in tea_decrypt() local
101 sum = TEA_DELTA << 5; in tea_decrypt()
106 z -= ((y << 4) + k2) ^ (y + sum) ^ ((y >> 5) + k3); in tea_decrypt()
107 y -= ((z << 4) + k0) ^ (z + sum) ^ ((z >> 5) + k1); in tea_decrypt()
108 sum -= TEA_DELTA; in tea_decrypt()
132 u32 y, z, sum = 0; in xtea_encrypt() local
[all …]
/Linux-v6.1/arch/sparc/lib/
Dchecksum_32.S20 #define CSUM_BIGCHUNK(buf, offset, sum, t0, t1, t2, t3, t4, t5) \ argument
23 addxcc t0, sum, sum; \
24 addxcc t1, sum, sum; \
26 addxcc t2, sum, sum; \
27 addxcc t3, sum, sum; \
29 addxcc t4, sum, sum; \
30 addxcc t5, sum, sum; \
31 addxcc t0, sum, sum; \
32 addxcc t1, sum, sum;
34 #define CSUM_LASTCHUNK(buf, offset, sum, t0, t1, t2, t3) \ argument
[all …]
/Linux-v6.1/arch/x86/include/asm/
Dchecksum_64.h17 * sum: 32bit unfolded sum
23 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()
82 * @sum: initial sum to be added in (32bit unfolded)
[all …]
Dchecksum_32.h10 * and adds in "sum" (32-bit)
20 asmlinkage __wsum csum_partial(const void *buff, int len, __wsum sum);
67 unsigned int sum; in ip_fast_csum() local
89 : "=r" (sum), "=r" (iph), "=r" (ihl) in ip_fast_csum()
92 return (__force __sum16)sum; in ip_fast_csum()
99 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
103 : "=r" (sum) in csum_fold()
104 : "r" ((__force u32)sum << 16), in csum_fold()
105 "0" ((__force u32)sum & 0xffff0000)); in csum_fold()
106 return (__force __sum16)(~(__force u32)sum >> 16); in csum_fold()
[all …]
/Linux-v6.1/arch/x86/um/asm/
Dchecksum.h11 * and adds in "sum" (32-bit)
21 extern __wsum csum_partial(const void *buff, int len, __wsum sum);
25 * sum: 32bit unfolded sum
31 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
36 : "=r" (sum) in csum_fold()
37 : "r" ((__force u32)sum << 16), in csum_fold()
38 "0" ((__force u32)sum & 0xffff0000) in csum_fold()
40 return (__force __sum16)(~(__force u32)sum >> 16); in csum_fold()
49 * @sum: initial sum to be added in (32bit unfolded)
56 __u8 proto, __wsum sum) in csum_tcpudp_nofold() argument
[all …]
/Linux-v6.1/arch/x86/lib/
Dcsum-wrappers_64.c17 * @isum: initial sum that is added into the result (32bit unfolded)
26 __wsum sum; in csum_and_copy_from_user() local
31 sum = csum_partial_copy_generic((__force const void *)src, dst, len); in csum_and_copy_from_user()
33 return sum; in csum_and_copy_from_user()
41 * @isum: initial sum that is added into the result (32bit unfolded)
50 __wsum sum; in csum_and_copy_to_user() local
55 sum = csum_partial_copy_generic(src, (void __force *)dst, len); in csum_and_copy_to_user()
57 return sum; in csum_and_copy_to_user()
65 * @sum: initial sum that is added into the result (32bit unfolded)
78 __u32 len, __u8 proto, __wsum sum) in csum_ipv6_magic() argument
[all …]
/Linux-v6.1/arch/mips/include/asm/
Dchecksum.h25 * and adds in "sum" (32-bit)
35 __wsum csum_partial(const void *buff, int len, __wsum sum);
79 u32 sum = (__force u32)csum; in csum_fold() local
81 sum += (sum << 16); in csum_fold()
82 csum = (__force __wsum)(sum < (__force u32)csum); in csum_fold()
83 sum >>= 16; in csum_fold()
84 sum += (__force u32)csum; in csum_fold()
86 return (__force __sum16)~sum; in csum_fold()
134 unsigned long sum = (__force unsigned long)daddr; in csum_tcpudp_nofold() local
139 sum += tmp; in csum_tcpudp_nofold()
[all …]
/Linux-v6.1/arch/m68k/include/asm/
Dchecksum.h13 * and adds in "sum" (32-bit)
23 __wsum csum_partial(const void *buff, int len, __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()
76 : "0" (sum), "1" (tmp)); in csum_fold()
[all …]
/Linux-v6.1/include/net/
Dchecksum.h39 __wsum sum = csum_partial(src, len, ~0U); in csum_and_copy_to_user() local
42 return sum; in csum_and_copy_to_user()
84 static __always_inline __wsum csum_shift(__wsum sum, int offset) in csum_shift() argument
86 /* rotate sum to align it with a 16b boundary */ in csum_shift()
88 return (__force __wsum)ror32((__force u32)sum, 8); in csum_shift()
89 return sum; in csum_shift()
117 __wsum csum_partial_ext(const void *buff, int len, __wsum sum) in csum_partial_ext() argument
119 return csum_partial(buff, len, sum); in csum_partial_ext()
124 static __always_inline void csum_replace_by_diff(__sum16 *sum, __wsum diff) in csum_replace_by_diff() argument
126 *sum = csum_fold(csum_add(diff, ~csum_unfold(*sum))); in csum_replace_by_diff()
[all …]
/Linux-v6.1/arch/arm64/include/asm/
Dchecksum.h13 __u32 len, __u8 proto, __wsum sum);
17 u32 sum = (__force u32)csum; in csum_fold() local
18 sum += (sum >> 16) | (sum << 16); in csum_fold()
19 return ~(__force __sum16)(sum >> 16); in csum_fold()
26 u64 sum; in ip_fast_csum() local
33 sum = tmp >> 64; in ip_fast_csum()
35 sum += *(const u32 *)iph; in ip_fast_csum()
39 sum += ((sum >> 32) | (sum << 32)); in ip_fast_csum()
40 return csum_fold((__force __wsum)(sum >> 32)); in ip_fast_csum()
/Linux-v6.1/arch/arm/include/asm/
Dchecksum.h17 * and adds in "sum" (32-bit)
27 __wsum csum_partial(const void *buff, int len, __wsum sum);
57 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
61 : "=r" (sum) in csum_fold()
62 : "r" (sum) in csum_fold()
64 return (__force __sum16)(~(__force u32)sum >> 16); in csum_fold()
75 __wsum sum; in ip_fast_csum() local
92 : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (tmp1) in ip_fast_csum()
95 return csum_fold(sum); in ip_fast_csum()
100 __u8 proto, __wsum sum) in csum_tcpudp_nofold() argument
[all …]
/Linux-v6.1/include/asm-generic/
Dchecksum.h7 * and adds in "sum" (32-bit)
17 extern __wsum csum_partial(const void *buff, int len, __wsum sum);
33 u32 sum = (__force u32)csum; in csum_fold() local
34 sum = (sum & 0xffff) + (sum >> 16); in csum_fold()
35 sum = (sum & 0xffff) + (sum >> 16); in csum_fold()
36 return (__force __sum16)~sum; in csum_fold()
47 __u8 proto, __wsum sum);
53 __u8 proto, __wsum sum) in csum_tcpudp_magic() argument
55 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); in csum_tcpudp_magic()
/Linux-v6.1/arch/arm64/lib/
Dcsum.c11 static u64 accumulate(u64 sum, u64 data) in accumulate() argument
13 __uint128_t tmp = (__uint128_t)sum + data; in accumulate()
23 unsigned int offset, shift, sum; in do_csum() local
124 sum = sum64 >> 32; in do_csum()
125 sum += (sum >> 16) | (sum << 16); in do_csum()
127 return (u16)swab32(sum); in do_csum()
129 return sum >> 16; in do_csum()
137 u64 sum = (__force u64)csum; in csum_ipv6_magic() local
142 sum += (__force u32)htonl(len); in csum_ipv6_magic()
144 sum += (u32)proto << 24; in csum_ipv6_magic()
[all …]
/Linux-v6.1/arch/alpha/include/asm/
Dchecksum.h18 __u32 len, __u8 proto, __wsum sum);
21 __u32 len, __u8 proto, __wsum sum);
25 * and adds in "sum" (32-bit)
35 extern __wsum csum_partial(const void *buff, 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()
73 __u32 len, __u8 proto, __wsum sum);
/Linux-v6.1/tools/testing/selftests/bpf/progs/
Dtest_rdonly_maps.c21 unsigned sum; member
29 unsigned iters = 0, sum = 0; in skip_loop() local
34 sum += *p; in skip_loop()
39 res.sum = sum; in skip_loop()
48 unsigned iters = 0, sum = 0; in part_loop() local
53 sum += *p; in part_loop()
58 res.sum = sum; in part_loop()
68 unsigned iters = 0, sum = 0; in full_loop() local
73 sum += *p; in full_loop()
79 res.sum = sum; in full_loop()
/Linux-v6.1/arch/ia64/include/asm/
Dchecksum.h21 __u32 len, __u8 proto, __wsum sum);
24 __u32 len, __u8 proto, __wsum sum);
28 * and adds in "sum" (32-bit)
38 extern __wsum csum_partial(const void *buff, int len, __wsum sum);
51 u32 sum = (__force u32)csum; in csum_fold() local
52 sum = (sum & 0xffff) + (sum >> 16); in csum_fold()
53 sum = (sum & 0xffff) + (sum >> 16); in csum_fold()
54 return (__force __sum16)~sum; in csum_fold()
/Linux-v6.1/arch/parisc/include/asm/
Dchecksum.h9 * and adds in "sum" (32-bit)
29 unsigned int sum; in ip_fast_csum() local
53 : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (t0), "=r" (t1), "=r" (t2) in ip_fast_csum()
57 return (__force __sum16)sum; in ip_fast_csum()
65 u32 sum = (__force u32)csum; in csum_fold() local
66 /* add the swapped two 16-bit halves of sum, in csum_fold()
69 giving us the correct sum in the upper half. */ in csum_fold()
70 sum += (sum << 16) + (sum >> 16); in csum_fold()
71 return (__force __sum16)(~sum >> 16); in csum_fold()
76 __wsum sum) in csum_tcpudp_nofold() argument
[all …]
/Linux-v6.1/drivers/infiniband/ulp/rtrs/
Drtrs-srv-stats.c34 struct rtrs_srv_stats_rdma_stats sum; in rtrs_srv_stats_rdma_to_str() local
37 memset(&sum, 0, sizeof(sum)); in rtrs_srv_stats_rdma_to_str()
42 sum.dir[READ].cnt += r->dir[READ].cnt; in rtrs_srv_stats_rdma_to_str()
43 sum.dir[READ].size_total += r->dir[READ].size_total; in rtrs_srv_stats_rdma_to_str()
44 sum.dir[WRITE].cnt += r->dir[WRITE].cnt; in rtrs_srv_stats_rdma_to_str()
45 sum.dir[WRITE].size_total += r->dir[WRITE].size_total; in rtrs_srv_stats_rdma_to_str()
49 sum.dir[READ].cnt, sum.dir[READ].size_total, in rtrs_srv_stats_rdma_to_str()
50 sum.dir[WRITE].cnt, sum.dir[WRITE].size_total); in rtrs_srv_stats_rdma_to_str()

12345678910>>...39