/linux-6.6.21/arch/arm/lib/ |
D | csumpartialcopygeneric.S | 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 83 adcs sum, sum, r8, put_byte_0 @ update checksum 89 mov sum, #-1 [all …]
|
D | csumpartial.S | 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 105 movne sum, sum, ror #8 [all …]
|
/linux-6.6.21/arch/powerpc/include/asm/ |
D | checksum.h | 39 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.6.21/net/ipv6/ |
D | ip6_checksum.c | 16 __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.6.21/arch/s390/include/asm/ |
D | checksum.h | 30 static inline __wsum csum_partial(const void *buff, int len, __wsum sum) in csum_partial() argument 41 : [sum] "+&d" (sum), [rp] "+&d" (rp.pair) : : "cc", "memory"); in csum_partial() 42 return sum; in csum_partial() 48 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument 50 u32 csum = (__force u32) sum; in csum_fold() 82 __u8 proto, __wsum sum) in csum_tcpudp_nofold() argument 84 __u64 csum = (__force __u64)sum; in csum_tcpudp_nofold() 99 __u8 proto, __wsum sum) in csum_tcpudp_magic() argument 101 return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); in csum_tcpudp_magic() 117 __u64 sum = (__force __u64)csum; in csum_ipv6_magic() local [all …]
|
/linux-6.6.21/arch/m68k/include/asm/ |
D | checksum.h | 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() 78 return (__force __sum16)~sum; in csum_fold() [all …]
|
/linux-6.6.21/arch/mips/include/asm/ |
D | checksum.h | 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() 142 sum += sum < tmp; in csum_tcpudp_nofold() [all …]
|
/linux-6.6.21/arch/loongarch/lib/ |
D | csum.c | 10 static u64 accumulate(u64 sum, u64 data) in accumulate() argument 12 sum += data; in accumulate() 13 if (sum < data) in accumulate() 14 sum += 1; in accumulate() 15 return sum; in accumulate() 24 unsigned int offset, shift, sum; in do_csum() local 112 sum = sum64 >> 32; in do_csum() 113 sum += (sum >> 16) | (sum << 16); in do_csum() 115 return (u16)swab32(sum); in do_csum() 117 return sum >> 16; in do_csum() [all …]
|
/linux-6.6.21/tools/testing/selftests/bpf/progs/ |
D | iters_num.c | 16 __s64 sum = 0, i; in num_empty_zero() local 18 bpf_for(i, 0, 0) sum += i; in num_empty_zero() 19 res_empty_zero = 1 + sum; in num_empty_zero() 30 __s64 sum = 0, i; in num_empty_int_min() local 32 bpf_for(i, INT_MIN, INT_MIN) sum += i; in num_empty_int_min() 33 res_empty_int_min = 2 + sum; in num_empty_int_min() 44 __s64 sum = 0, i; in num_empty_int_max() local 46 bpf_for(i, INT_MAX, INT_MAX) sum += i; in num_empty_int_max() 47 res_empty_int_max = 3 + sum; in num_empty_int_max() 58 __s64 sum = 0, i; in num_empty_minus_one() local [all …]
|
D | test_rdonly_maps.c | 21 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.6.21/sound/pci/ctxfi/ |
D | ctamixer.c | 91 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.6.21/arch/arm/include/asm/ |
D | checksum.h | 28 __wsum csum_partial(const void *buff, int len, __wsum sum); 58 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument 62 : "=r" (sum) in csum_fold() 63 : "r" (sum) in csum_fold() 65 return (__force __sum16)(~(__force u32)sum >> 16); in csum_fold() 76 __wsum sum; in ip_fast_csum() local 93 : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (tmp1) in ip_fast_csum() 96 return csum_fold(sum); in ip_fast_csum() 101 __u8 proto, __wsum sum) in csum_tcpudp_nofold() argument 104 if (__builtin_constant_p(sum) && sum == 0) { in csum_tcpudp_nofold() [all …]
|
/linux-6.6.21/arch/parisc/include/asm/ |
D | checksum.h | 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 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.6.21/crypto/ |
D | tea.c | 59 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.6.21/arch/x86/include/asm/ |
D | checksum_32.h | 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() 111 __wsum sum) in csum_tcpudp_nofold() argument [all …]
|
D | checksum_64.h | 22 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 __u8 proto, __wsum sum) in csum_tcpudp_nofold() argument 94 : "=r" (sum) in csum_tcpudp_nofold() [all …]
|
/linux-6.6.21/arch/x86/um/asm/ |
D | checksum.h | 21 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.6.21/arch/sparc/include/asm/ |
D | checksum_32.h | 33 __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 …]
|
D | checksum_64.h | 33 __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.6.21/arch/sh/include/asm/ |
D | checksum_32.h | 24 asmlinkage __wsum csum_partial(const void *buff, int len, __wsum sum); 63 static inline __sum16 csum_fold(__wsum sum) in csum_fold() argument 73 : "=r" (sum), "=&r" (__dummy) in csum_fold() 74 : "0" (sum) in csum_fold() 76 return (__force __sum16)sum; in csum_fold() 88 __wsum sum; in ip_fast_csum() local 108 : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (__dummy0), "=&z" (__dummy1) in ip_fast_csum() 112 return csum_fold(sum); in ip_fast_csum() 117 __wsum sum) in csum_tcpudp_nofold() argument 130 : "=r" (sum), "=r" (len_proto) in csum_tcpudp_nofold() [all …]
|
/linux-6.6.21/arch/mips/lib/ |
D | csum_partial.S | 59 #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.6.21/arch/arm64/lib/ |
D | csum.c | 11 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.6.21/arch/xtensa/include/asm/ |
D | checksum.h | 30 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.6.21/arch/arm64/include/asm/ |
D | checksum.h | 13 __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.6.21/arch/m68k/lib/ |
D | checksum.c | 38 __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 …]
|