| /kernel/linux/linux-5.10/arch/alpha/lib/ |
| D | csum_partial_copy.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * csum_partial_copy - do IP checksumming and copy 7 * Rick Gorton <rick.gorton@alpha-processor.com> 9 * Don't look at this too closely - you'll go mad. The things 87 unsigned long carry = 0; in csum_partial_cfu_aligned() local 93 checksum += carry; in csum_partial_cfu_aligned() 96 len -= 8; in csum_partial_cfu_aligned() 97 carry = checksum < word; in csum_partial_cfu_aligned() 102 checksum += carry; in csum_partial_cfu_aligned() 111 carry = checksum < word; in csum_partial_cfu_aligned() [all …]
|
| D | checksum.c | 1 // SPDX-License-Identifier: GPL-2.0 6 * in an architecture-specific manner due to speed.. 10 * Rick Gorton <rick.gorton@alpha-processor.com> 42 * computes the checksum of the TCP/UDP pseudo-header 43 * returns a 16-bit checksum, already complemented. 62 /* Fold down to 32-bits so we don't lose in the typedef-less in csum_tcpudp_nofold() 73 * Do a 64-bit checksum on an arbitrary memory area.. 77 * ways to do the carry, but this is reasonable. 89 len--; in do_csum() 92 count = len >> 1; /* nr of 16-bit words.. */ in do_csum() [all …]
|
| /kernel/linux/linux-6.6/arch/alpha/lib/ |
| D | csum_partial_copy.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * csum_partial_copy - do IP checksumming and copy 7 * Rick Gorton <rick.gorton@alpha-processor.com> 9 * Don't look at this too closely - you'll go mad. The things 88 unsigned long carry = 0; in csum_partial_cfu_aligned() local 94 checksum += carry; in csum_partial_cfu_aligned() 97 len -= 8; in csum_partial_cfu_aligned() 98 carry = checksum < word; in csum_partial_cfu_aligned() 103 checksum += carry; in csum_partial_cfu_aligned() 112 carry = checksum < word; in csum_partial_cfu_aligned() [all …]
|
| D | checksum.c | 1 // SPDX-License-Identifier: GPL-2.0 6 * in an architecture-specific manner due to speed.. 10 * Rick Gorton <rick.gorton@alpha-processor.com> 42 * computes the checksum of the TCP/UDP pseudo-header 43 * returns a 16-bit checksum, already complemented. 62 /* Fold down to 32-bits so we don't lose in the typedef-less in csum_tcpudp_nofold() 73 * Do a 64-bit checksum on an arbitrary memory area.. 77 * ways to do the carry, but this is reasonable. 89 len--; in do_csum() 92 count = len >> 1; /* nr of 16-bit words.. */ in do_csum() [all …]
|
| /kernel/linux/linux-6.6/arch/x86/crypto/ |
| D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0 14 - ADX (large integer arithmetic) 17 tristate "Ciphers: AES, modes: ECB, CBC, CTS, CTR, XTR, XTS, GCM (AES-NI)" 27 Length-preserving ciphers: AES with ECB, CBC, CTS, CTR, XTR, XTS 29 Architecture: x86 (32-bit and 64-bit) using: 30 - AES-NI (AES new instructions) 40 Length-preserving ciphers: Blowfish with ECB and CBC modes 51 Length-preserving ciphers: Camellia with ECB and CBC modes 56 tristate "Ciphers: Camellia with modes: ECB, CBC (AES-NI/AVX)" 63 Length-preserving ciphers: Camellia with ECB and CBC modes [all …]
|
| D | ghash-clmulni-intel_asm.S | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * Accelerated GHASH implementation with Intel PCLMULQDQ-NI 7 …* https://www.intel.com/content/dam/develop/external/us/en/documents/clmul-wp-rev-2-02-2014-04-20.… 64 # carry-less multiplication
|
| D | curve25519-x86_64.c | 1 // SPDX-License-Identifier: GPL-2.0 OR MIT 4 * Copyright (c) 2016-2020 INRIA, CMU and Microsoft Corporation 25 return xnx - (u64)1U; in eq_mask() 33 u64 x_sub_y = x - y; in gte_mask() 38 return x_xor_q_ - (u64)1U; in gte_mask() 41 /* Computes the addition of four-element f1 with value in f2 42 * and returns the carry (if any) */ 48 /* Clear registers to propagate the carry bit */ in add_scalar() 65 /* Return the carry bit in a register */ in add_scalar() 90 /* Step 1: Compute carry*38 */ in fadd() [all …]
|
| /kernel/linux/linux-5.10/lib/mpi/ |
| D | mpi-inline.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 /* mpi-inline.h - Internal to the Multi Precision Integers 32 if (s2_limb < x) { /* sum is less than the left operand: handle carry */ in mpihelp_add_1() 33 while (--s1_size) { in mpihelp_add_1() 34 x = *s1_ptr++ + 1; /* add carry */ in mpihelp_add_1() 39 return 1; /* return carry (size of s1 to small) */ in mpihelp_add_1() 45 for (i = 0; i < s1_size - 1; i++) in mpihelp_add_1() 48 return 0; /* no carry */ in mpihelp_add_1() 60 if (s1_size - s2_size) in mpihelp_add() 62 s1_size - s2_size, cy); in mpihelp_add() [all …]
|
| D | mpih-div.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* mpihelp-div.c - MPI helper functions 17 #include "mpi-internal.h" 41 * dividend is large, pre-invert the divisor, and use in mpihelp_mod_1() 49 && (UDIV_TIME - (2 * UMUL_TIME + 6)) * dividend_size > UDIV_TIME) { in mpihelp_mod_1() 58 /* Compute (2**2N - 2**N * DIVISOR_LIMB) / DIVISOR_LIMB. The in mpihelp_mod_1() 59 * result is a (N+1)-bit approximation to 1/DIVISOR_LIMB, with the in mpihelp_mod_1() 68 -divisor_limb, 0, divisor_limb); in mpihelp_mod_1() 70 n1 = dividend_ptr[dividend_size - 1]; in mpihelp_mod_1() 71 r = n1 >> (BITS_PER_MPI_LIMB - normalization_steps); in mpihelp_mod_1() [all …]
|
| /kernel/linux/linux-6.6/lib/crypto/mpi/ |
| D | mpi-inline.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 /* mpi-inline.h - Internal to the Multi Precision Integers 32 if (s2_limb < x) { /* sum is less than the left operand: handle carry */ in mpihelp_add_1() 33 while (--s1_size) { in mpihelp_add_1() 34 x = *s1_ptr++ + 1; /* add carry */ in mpihelp_add_1() 39 return 1; /* return carry (size of s1 to small) */ in mpihelp_add_1() 45 for (i = 0; i < s1_size - 1; i++) in mpihelp_add_1() 48 return 0; /* no carry */ in mpihelp_add_1() 60 if (s1_size - s2_size) in mpihelp_add() 62 s1_size - s2_size, cy); in mpihelp_add() [all …]
|
| D | mpih-div.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* mpihelp-div.c - MPI helper functions 17 #include "mpi-internal.h" 41 * dividend is large, pre-invert the divisor, and use in mpihelp_mod_1() 49 && (UDIV_TIME - (2 * UMUL_TIME + 6)) * dividend_size > UDIV_TIME) { in mpihelp_mod_1() 58 /* Compute (2**2N - 2**N * DIVISOR_LIMB) / DIVISOR_LIMB. The in mpihelp_mod_1() 59 * result is a (N+1)-bit approximation to 1/DIVISOR_LIMB, with the in mpihelp_mod_1() 68 -divisor_limb, 0, divisor_limb); in mpihelp_mod_1() 70 n1 = dividend_ptr[dividend_size - 1]; in mpihelp_mod_1() 71 r = n1 >> (BITS_PER_MPI_LIMB - normalization_steps); in mpihelp_mod_1() [all …]
|
| /kernel/linux/linux-5.10/arch/x86/crypto/ |
| D | ghash-clmulni-intel_asm.S | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * Accelerated GHASH implementation with Intel PCLMULQDQ-NI 7 …* http://software.intel.com/en-us/articles/carry-less-multiplication-and-its-usage-for-computing-t… 64 # carry-less multiplication
|
| D | curve25519-x86_64.c | 1 // SPDX-License-Identifier: GPL-2.0 OR MIT 4 * Copyright (c) 2016-2020 INRIA, CMU and Microsoft Corporation 25 return xnx - (u64)1U; in eq_mask() 33 u64 x_sub_y = x - y; in gte_mask() 38 return x_xor_q_ - (u64)1U; in gte_mask() 41 /* Computes the addition of four-element f1 with value in f2 42 * and returns the carry (if any) */ 48 /* Clear registers to propagate the carry bit */ in add_scalar() 65 /* Return the carry bit in a register */ in add_scalar() 91 /* Step 1: Compute carry*38 */ in fadd() [all …]
|
| /kernel/linux/linux-5.10/arch/hexagon/lib/ |
| D | checksum.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. 22 #define CARRY(x, y) ((0x0002ULL*x)<<y) macro 27 #define VR_CARRY(a, b, c, d) (CARRY(a, 48) + CARRY(b, 32) + CARRY(c, 16) \ 28 + CARRY(d, 0)) 47 * computes the checksum of the TCP/UDP pseudo-header 48 * returns a 16-bit checksum, already complemented. 66 /* Fold down to 32-bits so we don't lose in the typedef-less in csum_tcpudp_nofold() 77 * Do a 64-bit checksum on an arbitrary memory area.. 81 * ways to do the carry, but this is reasonable. [all …]
|
| /kernel/linux/linux-6.6/arch/hexagon/lib/ |
| D | checksum.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved. 22 #define CARRY(x, y) ((0x0002ULL*x)<<y) macro 27 #define VR_CARRY(a, b, c, d) (CARRY(a, 48) + CARRY(b, 32) + CARRY(c, 16) \ 28 + CARRY(d, 0)) 47 * computes the checksum of the TCP/UDP pseudo-header 48 * returns a 16-bit checksum, already complemented. 66 /* Fold down to 32-bits so we don't lose in the typedef-less in csum_tcpudp_nofold() 77 * Do a 64-bit checksum on an arbitrary memory area.. 81 * ways to do the carry, but this is reasonable. [all …]
|
| /kernel/linux/linux-5.10/arch/ia64/lib/ |
| D | checksum.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 1999, 2003 Hewlett-Packard Co 11 * in an architecture-specific manner due to speed.. 22 /* add up 32-bit words for 33 bits */ in from64to16() 24 /* add up 16-bit and 17-bit words for 17+c bits */ in from64to16() 26 /* add up 16-bit and 2-bit for 16+c bit */ in from64to16() 28 /* add up carry.. */ in from64to16() 34 * computes the checksum of the TCP/UDP pseudo-header 35 * returns a 16-bit checksum, already complemented. 57 /* Fold down to 32-bits so we don't lose in the typedef-less network stack. */ in csum_tcpudp_nofold() [all …]
|
| /kernel/linux/linux-6.6/arch/ia64/lib/ |
| D | checksum.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 1999, 2003 Hewlett-Packard Co 11 * in an architecture-specific manner due to speed.. 22 /* add up 32-bit words for 33 bits */ in from64to16() 24 /* add up 16-bit and 17-bit words for 17+c bits */ in from64to16() 26 /* add up 16-bit and 2-bit for 16+c bit */ in from64to16() 28 /* add up carry.. */ in from64to16() 34 * computes the checksum of the TCP/UDP pseudo-header 35 * returns a 16-bit checksum, already complemented. 57 /* Fold down to 32-bits so we don't lose in the typedef-less network stack. */ in csum_tcpudp_nofold() [all …]
|
| /kernel/linux/linux-5.10/arch/powerpc/lib/ |
| D | checksum_64.S | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * This file contains assembly-language implementations 4 * of IP-style 1's complement checksum routines. 6 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) 19 * and adds in "sum" (32-bit). 24 addic r0,r5,0 /* clear carry */ 26 srdi. r6,r4,3 /* less than 8 bytes? */ 35 rldicl. r6,r3,64-1,64-2 /* r6 = (r3 >> 1) & 0x3 */ 62 stdu r1,-STACKFRAMESIZE(r1) 175 addze r0,r0 /* add in final carry */ [all …]
|
| /kernel/linux/linux-6.6/arch/powerpc/lib/ |
| D | checksum_64.S | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * This file contains assembly-language implementations 4 * of IP-style 1's complement checksum routines. 6 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) 19 * and adds in "sum" (32-bit). 24 addic r0,r5,0 /* clear carry */ 26 srdi. r6,r4,3 /* less than 8 bytes? */ 35 rldicl. r6,r3,64-1,64-2 /* r6 = (r3 >> 1) & 0x3 */ 62 stdu r1,-STACKFRAMESIZE(r1) 175 addze r0,r0 /* add in final carry */ [all …]
|
| /kernel/linux/linux-6.6/drivers/media/common/videobuf2/ |
| D | frame_vector.c | 1 // SPDX-License-Identifier: GPL-2.0 14 * get_vaddr_frames() - map virtual addresses to pfns 29 * The function returns number of pages mapped which may be less than 35 * to be able to do that, but that could (racily) return non-refcounted 49 if (WARN_ON_ONCE(nr_frames > vec->nr_allocated)) in get_vaddr_frames() 50 nr_frames = vec->nr_allocated; in get_vaddr_frames() 58 (struct page **)(vec->ptrs)); in get_vaddr_frames() 59 vec->got_ref = true; in get_vaddr_frames() 60 vec->is_pfns = false; in get_vaddr_frames() 61 vec->nr_frames = ret; in get_vaddr_frames() [all …]
|
| /kernel/linux/linux-5.10/arch/sparc/lib/ |
| D | checksum_32.S | 1 /* SPDX-License-Identifier: GPL-2.0 */ 10 * Linux/Alpha checksum c-code 13 * David Mosberger-Tang for optimized reference c-code 35 ldd [buf - offset - 0x08], t0; \ 36 ldd [buf - offset - 0x00], t2; \ 50 addx %g0, %o2, %o2 ! add in final carry 57 addx %g0, %o2, %o2 ! add in final carry 60 addcc %o1, -1, %g0 ! only one byte remains? 74 addx %g0, %o2, %o0 ! add final carry into retval 79 bl cpte - 0x4 [all …]
|
| /kernel/linux/linux-6.6/arch/sparc/lib/ |
| D | checksum_32.S | 1 /* SPDX-License-Identifier: GPL-2.0 */ 10 * Linux/Alpha checksum c-code 13 * David Mosberger-Tang for optimized reference c-code 35 ldd [buf - offset - 0x08], t0; \ 36 ldd [buf - offset - 0x00], t2; \ 50 addx %g0, %o2, %o2 ! add in final carry 57 addx %g0, %o2, %o2 ! add in final carry 60 addcc %o1, -1, %g0 ! only one byte remains? 74 addx %g0, %o2, %o0 ! add final carry into retval 79 bl cpte - 0x4 [all …]
|
| /kernel/linux/linux-5.10/mm/ |
| D | frame_vector.c | 1 // SPDX-License-Identifier: GPL-2.0 12 * get_vaddr_frames() - map virtual addresses to pfns 27 * The function returns number of pages mapped which may be less than 33 * to be able to do that, but that could (racily) return non-refcounted 41 struct mm_struct *mm = current->mm; in get_vaddr_frames() 49 if (WARN_ON_ONCE(nr_frames > vec->nr_allocated)) in get_vaddr_frames() 50 nr_frames = vec->nr_allocated; in get_vaddr_frames() 58 ret = -EFAULT; in get_vaddr_frames() 67 * get_user_pages_longterm() and disallow it for filesystem-dax in get_vaddr_frames() 71 ret = -EOPNOTSUPP; in get_vaddr_frames() [all …]
|
| /kernel/linux/linux-6.6/drivers/net/ethernet/netronome/nfp/nfdk/ |
| D | nfdk.h | 1 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ 43 #define D_BLOCK_CPL(idx) (NFDK_TX_DESC_BLOCK_CNT - \ 74 * due to alignment constraints. The driver can make use of those bits to carry 80 * - NFDK_TX_BUF_INFO_SOP - Start of a packet 85 #define NFDK_TX_BUF_PTR(val) ((val) & ~(sizeof(void *) - 1)) 86 #define NFDK_TX_BUF_INFO(val) ((val) & (sizeof(void *) - 1)) 113 /* First descriptor fits less data, so adjust for that */ in nfp_nfdk_headlen_to_segs() 115 NFDK_TX_MAX_DATA_PER_DESC - in nfp_nfdk_headlen_to_segs()
|
| /kernel/linux/linux-5.10/arch/arm64/lib/ |
| D | strcmp.S | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 9 * http://bazaar.launchpad.net/~linaro-toolchain-dev/cortex-strings/trunk/ 20 * x0 - const string 1 pointer 21 * x1 - const string 2 pointer 23 * x0 - an integer less than, equal to, or greater than zero 24 * if s1 is found, respectively, to be less than, to match, 60 * NUL detection works on the principle that (X - 1) & (~X) & 0x80 61 * (=> (X - 1) & ~(X | 0x7f)) is non-zero iff a byte is zero, and 70 eor diff, data1, data2 /* Non-zero if differences found. */ 71 bic has_nul, tmp1, tmp2 /* Non-zero if NUL terminator. */ [all …]
|