Home
last modified time | relevance | path

Searched +full:carry +full:- +full:less (Results 1 – 25 of 124) sorted by relevance

12345

/linux/arch/alpha/lib/
H A Dcsum_partial_copy.c1 // 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 …]
/linux/lib/crypto/mpi/
H A Dmpi-inline.h1 /* 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 …]
H A Dmpih-div.c1 // 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 …]
/linux/arch/hexagon/lib/
H A Dchecksum.c1 // 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 …]
/linux/arch/powerpc/lib/
H A Dchecksum_64.S1 /* 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 …]
/linux/arch/x86/crypto/
H A DKconfig1 # SPDX-License-Identifier: GPL-2.0
6 tristate "Ciphers: AES, modes: ECB, CBC, CTS, CTR, XCTR, XTS, GCM (AES-NI/VAES)"
15 Length-preserving ciphers: AES with ECB, CBC, CTS, CTR, XCTR, XTS
17 Architecture: x86 (32-bit and 64-bit) using:
18 - AES-NI (AES new instructions)
19 - VAES (Vector AES)
21 Some algorithm implementations are supported only in 64-bit builds,
32 Length-preserving ciphers: Blowfish with ECB and CBC modes
43 Length-preserving ciphers: Camellia with ECB and CBC modes
48 tristate "Ciphers: Camellia with modes: ECB, CBC (AES-NI/AVX)"
[all …]
/linux/lib/
H A Dbitmap.c1 // SPDX-License-Identifier: GPL-2.0-only
32 * endian architectures. See the big-endian headers
33 * include/asm-ppc64/bitops.h and include/asm-s390/bitops.h
82 * __bitmap_shift_right - logical right shift of the bits in a bitmap
88 * Shifting right (dividing) means moving bits in the MS -> LS bit
109 if (off + k + 1 == lim - 1) in __bitmap_shift_right()
111 upper <<= (BITS_PER_LONG - rem); in __bitmap_shift_right()
114 if (off + k == lim - 1) in __bitmap_shift_right()
120 memset(&dst[lim - off], 0, off*sizeof(unsigned long)); in __bitmap_shift_right()
126 * __bitmap_shift_left - logical left shift of the bits in a bitmap
[all …]
/linux/drivers/media/common/videobuf2/
H A Dframe_vector.c1 // 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 …]
/linux/arch/sparc/lib/
H A Dchecksum_32.S1 /* 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 …]
/linux/drivers/net/ethernet/netronome/nfp/nfdk/
H A Dnfdk.h1 /* 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()
/linux/arch/m68k/fpsp040/
H A Dbindec.S12 | value in memory; d0 contains the k-factor sign-extended
13 | to 32-bits. The input may be either normalized,
18 | Saves and Modifies: D2-D7,A2,FP2
23 | The k-factor is saved for use in d7. Clear the
45 | k-factor can dictate either the total number of digits,
67 | A9. Scale X -> Y.
74 | compensated for by 'or-ing' in the INEX2 flag to
87 | or less than LEN -1 digits, adjust ILOG and repeat from
114 | d2: upper 32-bits of mantissa for binstr
115 | d3: scratch;lower 32-bits of mantissa for binstr
[all …]
H A Ddecbin.S5 | register A6 to extended-precision value in FP0.
9 | Output: Exact floating-point representation of the packed bcd value.
11 | Saves and Modifies: D2-D5
20 | Expected is a normal bcd (i.e. non-exceptional; all inf, zero,
33 | assumed following the least-significant digit.
43 | SM = 0 a non-zero digit in the integer position
44 | SM = 1 a non-zero digit in Mant0, lsd of the fraction
47 | representation (ex. 0.1E2, 1E1, 10E0, 100E-1), is converted
121 moveml %d2-%d5,-(%a7)
248 | 3. Add one for each zero encountered until a non-zero digit.
[all …]
H A Dround.S21 | round --- round result according to precision/mode
36 | a0 is preserved and the g-r-s bits in d0 are cleared.
37 | The result is not typed - the tag field is invalid. The
41 | inexact (i.e. if any of the g-r-s bits were set).
51 | ;the appropriate g-r-s bits.
117 asll #1,%d0 |shift g-bit to c-bit
124 | ext_grs --- extract guard, round and sticky bits
144 moveml %d2/%d3,-(%a7) |make some temp registers
148 bfextu LOCAL_HI(%a0){#24:#2},%d3 |sgl prec. g-r are 2 bits right
150 lsll %d2,%d3 |shift g-r bits to MSB of d3
[all …]
/linux/arch/arm64/crypto/
H A Daes-modes.S1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * linux/arch/arm64/crypto/aes-modes.S - chaining mode wrappers for AES
5 * Copyright (C) 2013 - 2017 Linaro Ltd <ard.biesheuvel@linaro.org>
8 /* included by aes-ce.S and aes-neon.S */
62 ld1 {v0.16b-v3.16b}, [x1], #64 /* get 4 pt blocks */
66 st1 {v0.16b-v3.16b}, [x0], #64
92 ld1 {v0.16b-v3.16b}, [x1], #64 /* get 4 ct blocks */
96 st1 {v0.16b-v3.16b}, [x0], #64
130 mov w8, #14 /* AES-256: 14 rounds */
143 ld1 {v0.16b-v3.16b}, [x1], #64 /* get 4 pt blocks */
[all …]
/linux/net/ipv4/
H A Dtcp_rate.c1 // SPDX-License-Identifier: GPL-2.0-only
21 * send_rate = #pkts_delivered/(last_snd_time - first_snd_time)
22 * ack_rate = #pkts_delivered/(last_ack_time - first_ack_time)
28 * deliberately avoids using the inter-packet spacing approach because that
31 * TCP flows can often be application-limited in request/response workloads.
32 * The estimator marks a bandwidth sample as application-limited if there
46 * the full time the network needs to deliver all in-flight in tcp_rate_skb_sent()
53 * because the latter is a guess based on RTO and loss-marking in tcp_rate_skb_sent()
58 if (!tp->packets_out) { in tcp_rate_skb_sent()
61 tp->first_tx_mstamp = tstamp_us; in tcp_rate_skb_sent()
[all …]
/linux/rust/kernel/alloc/
H A Dkvec.rs1 // SPDX-License-Identifier: GPL-2.0
73 /// For non-zero-sized values, a [`Vec`] will use the given allocator `A` for its allocation. For
76 /// For zero-sized types the [`Vec`]'s pointer must be `dangling_mut::<T>`; no memory is allocated.
83 /// A [`Vec`] can be deconstructed into and (re-)constructed from its previously named raw parts
86 /// [`Vec`]'s backing buffer gets, if required, automatically increased (re-allocated) when elements
91 /// - `self.ptr` is always properly aligned and either points to memory allocated with `A` or, for
92 /// zero-sized types, is a dangling, well aligned pointer.
94 /// - `self.len` always represents the exact number of elements stored in the vector.
96 /// - `self.layout` represents the absolute number of elements that can be stored within the vector
97 /// without re-allocation. For ZSTs `self.layout`'s capacity is zero. However, it is legal for the
[all …]
/linux/arch/powerpc/include/asm/
H A Dsfp-machine.h1 /* Machine-dependent software floating-point definitions. PPC version.
18 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 denominator, which also happens to be the hardware I have :->
37 #define __ll_lowpart(t) ((UWtype) (t) & (__ll_B - 1))
43 * in op-2.h] or a call to add_ssaaaa (see below).
57 * _FP_DIV_HELP_ldiv (see op-1.h).
63 * -- PMM
89 * a comma-separated set of 32bit unsigned ints that encode NaN.
91 #define _FP_NANFRAC_S ((_FP_QNANBIT_S << 1) - 1)
92 #define _FP_NANFRAC_D ((_FP_QNANBIT_D << 1) - 1), -1
[all …]
/linux/arch/arm/nwfpe/
H A Dsoftfloat-macros5 This C source fragment is part of the SoftFloat IEC/IEEE Floating-point
11 National Science Foundation under grant MIP-9311980. The original version
12 of this code was written as part of a project to build a fixed-point vector
16 http://www.jhauser.us/arithmetic/SoftFloat-2b/SoftFloat-source.txt
33 -------------------------------------------------------------------------------
40 -------------------------------------------------------------------------------
49 z = ( a>>count ) | ( ( a<<( ( - count ) & 31 ) ) != 0 );
58 -------------------------------------------------------------------------------
65 -------------------------------------------------------------------------------
71 __asm__("@shift64RightJamming -- start");
[all …]
/linux/Documentation/filesystems/
H A Dromfs.rst1 .. SPDX-License-Identifier: GPL-2.0
4 ROMFS - ROM File System
16 while romfs is less than a page, about 4000 bytes (assuming i586
26 As the name suggests, romfs could be also used (space-efficiently) on
27 various read-only media, like (E)EPROM disks if someone will have the
34 floppy drives can be loaded later if you use the "initrd"--initial
35 RAM disk--feature of the kernel. This would not be really news
46 from a nearby server, so you don't want to carry two disks for this
52 is 32 bytes (this is an empty file, with a less than 16 character
53 name). The maximum overhead for any non-empty file is the header, and
[all …]
/linux/drivers/infiniband/hw/hfi1/
H A Dpio.h1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
3 * Copyright(c) 2015-2017 Intel Corporation.
21 /* PIO release codes - in bits, as there could more than one that apply */
28 #define PRC_SC_DISABLE 0x20 /* clean-up after a context disable */
45 union mix carry; /* pending unwritten bytes */ member
47 u8 carry_bytes; /* number of valid bytes in carry */
55 /* per-NUMA send context */
57 /* read-only after init */
76 unsigned long alloc_free; /* copy of free (less cache thrash) */
132 * Since the mapping now allows for non-uniform send contexts per vl, the
[all …]
/linux/arch/x86/math-emu/
H A Dreg_u_sub.S1 /* SPDX-License-Identifier: GPL-2.0 */
3 /*---------------------------------------------------------------------------+
10 | E-mail billm@suburbia.net |
15 | Return value is the tag of the answer, or-ed with FPU_Exception if |
16 | one was raised, or -1 on internal error. |
18 +---------------------------------------------------------------------------*/
47 subl PARAM7,%ecx /* exp1 - exp2 */
60 /*--------------------------------------+
63 +--------------------------------------*/
73 /*--------------------------------------+
[all …]
/linux/arch/sparc/math-emu/
H A Dmath_64.c1 // SPDX-License-Identifier: GPL-2.0
3 * arch/sparc64/math-emu/math.c
8 * Emulation routines originate from soft-fp package, which is part
22 #include "sfp-util_64.h"
23 #include <math-emu/soft-fp.h>
24 #include <math-emu/single.h>
25 #include <math-emu/double.h>
26 #include <math-emu/quad.h>
28 /* QUAD - ftt == 3 */
46 /* SUBNORMAL - ftt == 2 */
[all …]
/linux/tools/testing/selftests/alsa/
H A Dmixer-test.c1 // SPDX-License-Identifier: GPL-2.0
6 // Copyright (c) 2021-2 Arm Limited
29 #include "alsa-local.h"
70 card = -1; in find_controls()
83 err = snd_ctl_open_lconf(&card_data->handle, name, 0, config); in find_controls()
97 err = snd_ctl_card_info_malloc(&card_data->info); in find_controls()
102 err = snd_ctl_card_info(card_data->handle, card_data->inf in find_controls()
[all...]
/linux/include/scsi/
H A Dscsi_cmnd.h1 /* SPDX-License-Identifier: GPL-2.0 */
5 #include <linux/dma-mapping.h>
7 #include <linux/t10-pi.h>
18 * The longest fixed-length SCSI CDB as per the SCSI standard.
19 * fixed-length means: commands that their size can be determined
20 * by their opcode and the CDB does not carry a length specifier, (unlike
25 * So in effect MAX_COMMAND_SIZE means the maximum size command scsi-ml
51 /* for scmd->flags */
57 * SCSI EH should not overwrite scmd->result when SCMD_FORCE_EH_SUCCESS is set.
64 /* for scmd->state */
[all …]
/linux/LICENSES/preferred/
H A DLGPL-2.11 Valid-License-Identifier: LGPL-2.1
2 Valid-License-Identifier: LGPL-2.1-only
3 Valid-License-Identifier: LGPL-2.1+
4 Valid-License-Identifier: LGPL-2.1-or-later
5 SPDX-URL: https://spdx.org/licenses/LGPL-2.1.html
6 Usage-Guide:
11 SPDX-License-Identifier: LGPL-2.1
14 SPDX-License-Identifier: LGPL-2.1+
15 License-Text:
34 intended to guarantee your freedom to share and change free software--to
[all …]

12345