Home
last modified time | relevance | path

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

12345678910>>...19

/linux-6.1.9/arch/arm/lib/
Dcsumpartialcopygeneric.S21 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
83 adcs sum, sum, r8, put_byte_0 @ update checksum
89 mov sum, #-1
[all …]
Dcsumpartial.S20 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
105 movne sum, sum, ror #8
[all …]
/linux-6.1.9/arch/powerpc/include/asm/
Dchecksum.h39 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
41 u32 tmp = (__force u32)sum; 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()
89 __u8 proto, __wsum sum) in csum_tcpudp_magic() argument
91 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); in csum_tcpudp_magic()
116 static __always_inline __wsum csum_shift(__wsum sum, int offset) in csum_shift() argument
[all …]
/linux-6.1.9/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-6.1.9/arch/s390/include/asm/
Dchecksum.h30 static inline __wsum csum_partial(const void *buff, int len, __wsum sum) in csum_partial() argument
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
100 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); in csum_tcpudp_magic()
116 __u64 sum = (__force __u64)csum; in csum_ipv6_magic() local
[all …]
/linux-6.1.9/arch/m68k/include/asm/
Dchecksum.h23 __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()
78 return (__force __sum16)~sum; in csum_fold()
[all …]
/linux-6.1.9/arch/mips/include/asm/
Dchecksum.h35 __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()
142 sum += sum < tmp; in csum_tcpudp_nofold()
[all …]
/linux-6.1.9/arch/arm/include/asm/
Dchecksum.h27 __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
103 if (__builtin_constant_p(sum) && sum == 0) { in csum_tcpudp_nofold()
[all …]
/linux-6.1.9/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-6.1.9/arch/parisc/include/asm/
Dchecksum.h29 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
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
83 : "=r" (sum) in csum_tcpudp_nofold()
84 : "r" (daddr), "r"(saddr), "r"(proto+len), "0"(sum)); in csum_tcpudp_nofold()
85 return sum; in csum_tcpudp_nofold()
[all …]
/linux-6.1.9/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-6.1.9/arch/x86/include/asm/
Dchecksum_32.h20 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()
111 __wsum sum) in csum_tcpudp_nofold() 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 …]
/linux-6.1.9/arch/x86/um/asm/
Dchecksum.h21 extern __wsum csum_partial(const void *buff, int len, __wsum 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()
56 __u8 proto, __wsum sum) in csum_tcpudp_nofold() argument
62 : "=r" (sum) in csum_tcpudp_nofold()
63 : "g" (daddr), "g" (saddr), "g" ((len + proto) << 8), "0" (sum)); in csum_tcpudp_nofold()
64 return sum; in csum_tcpudp_nofold()
[all …]
/linux-6.1.9/arch/sparc/include/asm/
Dchecksum_32.h33 __wsum csum_partial(const void *buff, int len, __wsum sum);
83 __sum16 sum; in ip_fast_csum() local
111 : "=r" (sum), "=&r" (iph) in ip_fast_csum()
114 return sum; in ip_fast_csum()
118 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
126 : "=&r" (sum), "=r" (tmp) in csum_fold()
127 : "0" (sum), "1" ((__force u32)sum<<16) in csum_fold()
129 return (__force __sum16)sum; in csum_fold()
134 __wsum sum) in csum_tcpudp_nofold() argument
140 : "=r" (sum), "=r" (saddr) in csum_tcpudp_nofold()
[all …]
Dchecksum_64.h33 __wsum csum_partial(const void * buff, int len, __wsum sum);
51 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
60 : "=&r" (sum), "=r" (tmp) in csum_fold()
61 : "0" (sum), "1" ((__force u32)sum<<16) in csum_fold()
63 return (__force __sum16)sum; in csum_fold()
68 __wsum sum) in csum_tcpudp_nofold() argument
75 : "=r" (sum), "=r" (saddr) in csum_tcpudp_nofold()
76 : "r" (daddr), "r" (proto + len), "0" (sum), "1" (saddr) in csum_tcpudp_nofold()
78 return sum; in csum_tcpudp_nofold()
87 __wsum sum) in csum_tcpudp_magic() argument
[all …]
/linux-6.1.9/arch/sh/include/asm/
Dchecksum_32.h23 asmlinkage __wsum csum_partial(const void *buff, int len, __wsum sum);
62 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
72 : "=r" (sum), "=&r" (__dummy) in csum_fold()
73 : "0" (sum) in csum_fold()
75 return (__force __sum16)sum; in csum_fold()
87 __wsum sum; in ip_fast_csum() local
107 : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (__dummy0), "=&z" (__dummy1) in ip_fast_csum()
111 return csum_fold(sum); in ip_fast_csum()
116 __wsum sum) in csum_tcpudp_nofold() argument
129 : "=r" (sum), "=r" (len_proto) in csum_tcpudp_nofold()
[all …]
/linux-6.1.9/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-6.1.9/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-6.1.9/arch/xtensa/include/asm/
Dchecksum.h30 asmlinkage __wsum csum_partial(const void *buff, int len, __wsum sum);
67 static __inline__ __sum16 csum_fold(__wsum sum) in csum_fold() argument
79 : "=r" (sum), "=&r" (__dummy) in csum_fold()
80 : "0" (sum)); in csum_fold()
81 return (__force __sum16)sum; in csum_fold()
90 unsigned int sum, tmp, endaddr; in ip_fast_csum() local
115 : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (tmp), in ip_fast_csum()
120 return csum_fold(sum); in ip_fast_csum()
125 __wsum sum) in csum_tcpudp_nofold() argument
147 : "=r" (sum), "=r" (len_proto) in csum_tcpudp_nofold()
[all …]
/linux-6.1.9/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-6.1.9/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-6.1.9/arch/m68k/lib/
Dchecksum.c38 __wsum csum_partial(const void *buff, int len, __wsum sum) in csum_partial() argument
117 : "=d" (sum), "=d" (len), "=a" (buff), in csum_partial()
119 : "0" (sum), "1" (len), "2" (buff) in csum_partial()
121 return(sum); in csum_partial()
140 __wsum sum = ~0U; in csum_and_copy_from_user() local
260 : "=d" (sum), "=d" (len), "=a" (src), "=a" (dst), in csum_and_copy_from_user()
262 : "0" (sum), "1" (len), "2" (src), "3" (dst) in csum_and_copy_from_user()
265 return sum; in csum_and_copy_from_user()
277 __wsum sum = 0; in csum_partial_copy_nocheck() local
363 : "=d" (sum), "=d" (len), "=a" (src), "=a" (dst), in csum_partial_copy_nocheck()
[all …]
/linux-6.1.9/include/asm-generic/
Dchecksum.h17 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-6.1.9/arch/nios2/include/asm/
Dchecksum.h14 extern __wsum csum_partial(const void *buff, int len, __wsum sum);
21 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument
29 : "=r" (sum) in csum_fold()
30 : "r" (sum << 16), "0" (sum) in csum_fold()
32 return (__force __sum16) sum; in csum_fold()
42 __wsum sum) in csum_tcpudp_nofold() argument
54 : "=r" (sum), "=r" (saddr) in csum_tcpudp_nofold()
56 "0" (sum), in csum_tcpudp_nofold()
60 return sum; in csum_tcpudp_nofold()
65 __wsum sum) in csum_tcpudp_magic() argument
[all …]

12345678910>>...19