/lib/mpi/ |
D | mpiutil.c | 32 MPI a; in mpi_alloc() local 34 a = kmalloc(sizeof *a, GFP_KERNEL); in mpi_alloc() 35 if (!a) in mpi_alloc() 36 return a; in mpi_alloc() 39 a->d = mpi_alloc_limb_space(nlimbs); in mpi_alloc() 40 if (!a->d) { in mpi_alloc() 41 kfree(a); in mpi_alloc() 45 a->d = NULL; in mpi_alloc() 48 a->alloced = nlimbs; in mpi_alloc() 49 a->nlimbs = 0; in mpi_alloc() [all …]
|
D | mpi-bit.c | 30 void mpi_normalize(MPI a) in mpi_normalize() argument 32 for (; a->nlimbs && !a->d[a->nlimbs - 1]; a->nlimbs--) in mpi_normalize() 39 unsigned mpi_get_nbits(MPI a) in mpi_get_nbits() argument 43 mpi_normalize(a); in mpi_get_nbits() 45 if (a->nlimbs) { in mpi_get_nbits() 46 mpi_limb_t alimb = a->d[a->nlimbs - 1]; in mpi_get_nbits() 51 n = BITS_PER_MPI_LIMB - n + (a->nlimbs - 1) * BITS_PER_MPI_LIMB; in mpi_get_nbits()
|
D | mpicoder.c | 40 mpi_limb_t a; in mpi_read_raw_data() local 68 a = 0; in mpi_read_raw_data() 70 a <<= 8; in mpi_read_raw_data() 71 a |= *buffer++; in mpi_read_raw_data() 74 val->d[j - 1] = a; in mpi_read_raw_data() 112 static int count_lzeros(MPI a) in count_lzeros() argument 117 for (i = a->nlimbs - 1; i >= 0; i--) { in count_lzeros() 118 alimb = a->d[i]; in count_lzeros() 143 int mpi_read_buffer(MPI a, uint8_t *buf, unsigned buf_len, unsigned *nbytes, in mpi_read_buffer() argument 154 unsigned int n = mpi_get_size(a); in mpi_read_buffer() [all …]
|
/lib/math/ |
D | gcd.c | 23 unsigned long gcd(unsigned long a, unsigned long b) in gcd() argument 25 unsigned long r = a | b; in gcd() 27 if (!a || !b) in gcd() 35 a >>= __ffs(a); in gcd() 36 if (a == 1) in gcd() 38 if (a == b) in gcd() 39 return a << __ffs(r); in gcd() 41 if (a < b) in gcd() 42 swap(a, b); in gcd() 43 a -= b; in gcd() [all …]
|
D | lcm.c | 8 unsigned long lcm(unsigned long a, unsigned long b) in lcm() argument 10 if (a && b) in lcm() 11 return (a / gcd(a, b)) * b; in lcm() 17 unsigned long lcm_not_zero(unsigned long a, unsigned long b) in lcm_not_zero() argument 19 unsigned long l = lcm(a, b); in lcm_not_zero() 24 return (b ? : a); in lcm_not_zero()
|
D | rational.c | 42 unsigned long t, a; in rational_best_approximation() local 51 a = n / d; in rational_best_approximation() 54 t = n0 + a * n1; in rational_best_approximation() 57 t = d0 + a * d1; in rational_best_approximation()
|
/lib/crypto/ |
D | des.c | 609 #define DES_PC2(a, b, c, d) (T4(d) | T3(c) | T2(b) | T1(a)) argument 626 unsigned long a, b, c, d, w; in des_ekey() local 632 a = k[7]; a &= 0x0e; a <<= 4; a |= k[3] & 0x1e; a = pc1[a]; in des_ekey() 634 pe[15 * 2 + 0] = DES_PC2(a, b, c, d); d = rs[d]; in des_ekey() 635 pe[14 * 2 + 0] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b]; in des_ekey() 636 pe[13 * 2 + 0] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d]; in des_ekey() 637 pe[12 * 2 + 0] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b]; in des_ekey() 638 pe[11 * 2 + 0] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d]; in des_ekey() 639 pe[10 * 2 + 0] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b]; in des_ekey() 640 pe[ 9 * 2 + 0] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d]; in des_ekey() [all …]
|
D | sha256.c | 48 u32 a, b, c, d, e, f, g, h, t1, t2; in sha256_transform() local 61 a = state[0]; b = state[1]; c = state[2]; d = state[3]; in sha256_transform() 66 t2 = e0(a) + Maj(a, b, c); d += t1; h = t1 + t2; in sha256_transform() 68 t2 = e0(h) + Maj(h, a, b); c += t1; g = t1 + t2; in sha256_transform() 70 t2 = e0(g) + Maj(g, h, a); b += t1; f = t1 + t2; in sha256_transform() 72 t2 = e0(f) + Maj(f, g, h); a += t1; e = t1 + t2; in sha256_transform() 73 t1 = d + e1(a) + Ch(a, b, c) + 0x3956c25b + W[4]; in sha256_transform() 75 t1 = c + e1(h) + Ch(h, a, b) + 0x59f111f1 + W[5]; in sha256_transform() 77 t1 = b + e1(g) + Ch(g, h, a) + 0x923f82a4 + W[6]; in sha256_transform() 79 t1 = a + e1(f) + Ch(f, g, h) + 0xab1c5ed5 + W[7]; in sha256_transform() [all …]
|
D | arc4.c | 24 u32 a = ctx->S[i]; in arc4_setkey() local 26 j = (j + in_key[k] + a) & 0xff; in arc4_setkey() 28 ctx->S[j] = a; in arc4_setkey() 40 u32 x, y, a, b; in arc4_crypt() local 49 a = S[x]; in arc4_crypt() 50 y = (y + a) & 0xff; in arc4_crypt() 54 S[y] = a; in arc4_crypt() 55 a = (a + b) & 0xff; in arc4_crypt() 61 *out++ = *in++ ^ S[a]; in arc4_crypt() 65 a = ta; in arc4_crypt()
|
/lib/ |
D | sort.c | 58 static void swap_words_32(void *a, void *b, size_t n) in swap_words_32() argument 61 u32 t = *(u32 *)(a + (n -= 4)); in swap_words_32() 62 *(u32 *)(a + n) = *(u32 *)(b + n); in swap_words_32() 83 static void swap_words_64(void *a, void *b, size_t n) in swap_words_64() argument 87 u64 t = *(u64 *)(a + (n -= 8)); in swap_words_64() 88 *(u64 *)(a + n) = *(u64 *)(b + n); in swap_words_64() 92 u32 t = *(u32 *)(a + (n -= 4)); in swap_words_64() 93 *(u32 *)(a + n) = *(u32 *)(b + n); in swap_words_64() 96 t = *(u32 *)(a + (n -= 4)); in swap_words_64() 97 *(u32 *)(a + n) = *(u32 *)(b + n); in swap_words_64() [all …]
|
D | list_sort.c | 20 struct list_head *a, struct list_head *b) in merge() argument 26 if (cmp(priv, a, b) <= 0) { in merge() 27 *tail = a; in merge() 28 tail = &a->next; in merge() 29 a = a->next; in merge() 30 if (!a) { in merge() 39 *tail = a; in merge() 56 struct list_head *a, struct list_head *b) in merge_final() argument 63 if (cmp(priv, a, b) <= 0) { in merge_final() 64 tail->next = a; in merge_final() [all …]
|
D | test_sort.c | 10 static int __init cmpint(const void *a, const void *b) in cmpint() argument 12 return *(int *)a - *(int *)b; in cmpint() 17 int *a, i, r = 1, err = -ENOMEM; in test_sort_init() local 19 a = kmalloc_array(TEST_LEN, sizeof(*a), GFP_KERNEL); in test_sort_init() 20 if (!a) in test_sort_init() 25 a[i] = r; in test_sort_init() 28 sort(a, TEST_LEN, sizeof(*a), cmpint, NULL); in test_sort_init() 32 if (a[i] > a[i+1]) { in test_sort_init() 39 kfree(a); in test_sort_init()
|
D | Kconfig | 27 converting bitfields between a CPU-usable representation and a 29 - Is little endian (bytes are reversed within a 32-bit group) 30 - The least-significant 32-bit word comes first (within a 64-bit 32 - The most significant bit of a byte is at its right (bit 0 of a 103 modules require CRC-CCITT functions, but a module built outside 111 modules require CRC16 functions, but a module built outside 120 This option is only needed if a module that's not in the 128 modules require CRC ITU-T V.41 functions, but a module built outside 138 modules require CRC32/CRC32c functions, but a module built outside 146 This option enables the CRC32 library functions to perform a [all …]
|
D | glob.c | 73 unsigned char a = *class++; in glob_match() local 81 unsigned char b = a; in glob_match() 83 if (a == '\0') /* Malformed */ in glob_match() 95 match |= (a <= c && c <= b); in glob_match() 96 } while ((a = *class++) != ']'); in glob_match()
|
D | bch.c | 305 static inline unsigned int gf_mul(struct bch_control *bch, unsigned int a, in gf_mul() argument 308 return (a && b) ? bch->a_pow_tab[mod_s(bch, bch->a_log_tab[a]+ in gf_mul() 312 static inline unsigned int gf_sqr(struct bch_control *bch, unsigned int a) in gf_sqr() argument 314 return a ? bch->a_pow_tab[mod_s(bch, 2*bch->a_log_tab[a])] : 0; in gf_sqr() 317 static inline unsigned int gf_div(struct bch_control *bch, unsigned int a, in gf_div() argument 320 return a ? bch->a_pow_tab[mod_s(bch, bch->a_log_tab[a]+ in gf_div() 324 static inline unsigned int gf_inv(struct bch_control *bch, unsigned int a) in gf_inv() argument 326 return bch->a_pow_tab[GF_N(bch)-bch->a_log_tab[a]]; in gf_inv() 518 static int find_affine4_roots(struct bch_control *bch, unsigned int a, in find_affine4_roots() argument 527 k = a_log(bch, a); in find_affine4_roots() [all …]
|
D | memcat_p.c | 10 void **__memcat_p(void **a, void **b) in __memcat_p() argument 12 void **p = a, **new; in __memcat_p() 16 for (nr = 0, p = a; *p; nr++, p++) in __memcat_p() 28 for (nr--; nr >= 0; nr--, p = p == b ? &a[nr] : p - 1) in __memcat_p()
|
D | ucs2_string.c | 36 ucs2_strncmp(const ucs2_char_t *a, const ucs2_char_t *b, size_t len) in ucs2_strncmp() argument 41 if (*a < *b) in ucs2_strncmp() 43 if (*a > *b) in ucs2_strncmp() 45 if (*a == 0) /* implies *b == 0 */ in ucs2_strncmp() 47 a++; in ucs2_strncmp()
|
D | atomic64.c | 70 void atomic64_##op(s64 a, atomic64_t *v) \ 76 v->counter c_op a; \ 82 s64 atomic64_##op##_return(s64 a, atomic64_t *v) \ 89 val = (v->counter c_op a); \ 96 s64 atomic64_fetch_##op(s64 a, atomic64_t *v) \ 104 v->counter c_op a; \ 177 s64 atomic64_fetch_add_unless(atomic64_t *v, s64 a, s64 u) in atomic64_fetch_add_unless() argument 186 v->counter += a; in atomic64_fetch_add_unless()
|
D | extable.c | 28 static void swap_ex(void *a, void *b, int size) in swap_ex() argument 30 struct exception_table_entry *x = a, *y = b, tmp; in swap_ex() 31 int delta = b - a; in swap_ex() 52 static int cmp_ex_sort(const void *a, const void *b) in cmp_ex_sort() argument 54 const struct exception_table_entry *x = a, *y = b; in cmp_ex_sort()
|
D | test_overflow.c | 19 t a, b; \ 218 #define check_one_op(t, fmt, op, sym, a, b, r, of) do { \ argument 222 _of = check_ ## op ## _overflow(a, b, &_r); \ 226 a, b, of ? "" : " not", #t); \ 232 a, b, r, _r, #t); \ 242 check_one_op(t, fmt, add, "+", p->a, p->b, p->sum, p->s_of); \ 243 check_one_op(t, fmt, add, "+", p->b, p->a, p->sum, p->s_of); \ 244 check_one_op(t, fmt, sub, "-", p->a, p->b, p->diff, p->d_of); \ 245 check_one_op(t, fmt, mul, "*", p->a, p->b, p->prod, p->p_of); \ 246 check_one_op(t, fmt, mul, "*", p->b, p->a, p->prod, p->p_of); \ [all …]
|
D | Kconfig.kgdb | 29 Share a serial console with kgdb. Sysrq-g must be used 36 This is a kgdb I/O module specifically designed to test 42 a kernel boot arguments "kgdbwait kgdbts=V1F100" 50 to pass in a kernel parameter 68 exception handler which will allow kgdb to step through a 107 KDB can use a PS/2 type keyboard for an input device 114 This integer controls the behaviour of kdb when the kernel gets a 115 catastrophic error, i.e. for a panic or oops. 116 When KDB is active and a catastrophic error occurs, nothing extra 124 CONFIG_KDB_CONTINUE_CATASTROPHIC == 2. KDB forces a reboot.
|
D | Kconfig.debug | 25 Selecting this option causes printk() to add a caller "thread id" (if 26 in task context) or a caller "processor id" (if not in task context) 45 Setting a default here is equivalent to passing in loglevel=<x> in 72 that are auditing their logs closely may want to set it to a lower 77 or pick a different CONSOLE_LOGLEVEL_DEFAULT configuration value. 84 by inserting a short delay after each one. The delay is 90 See a previous boot log for the "lpj" value to use for your 111 If a source file is compiled with DEBUG flag set, any 122 file contains a list of the debug statements that can be enabled. The 134 From a live system: [all …]
|
/lib/raid6/ |
D | mktables.c | 21 static uint8_t gfmul(uint8_t a, uint8_t b) in gfmul() argument 27 v ^= a; in gfmul() 28 a = (a << 1) ^ (a & 0x80 ? 0x1d : 0); in gfmul() 35 static uint8_t gfpow(uint8_t a, int b) in gfpow() argument 45 v = gfmul(v, a); in gfpow() 46 a = gfmul(a, a); in gfpow()
|
/lib/zlib_inflate/ |
D | inffast.c | 43 # define PUP(a) *(a)++ argument 44 # define UP_UNALIGNED(a) get_unaligned16((a)++) argument 47 # define PUP(a) *++(a) argument 48 # define UP_UNALIGNED(a) get_unaligned16(++(a)) argument
|
/lib/zstd/ |
D | zstd_internal.h | 39 #define MIN(a, b) ((a) < (b) ? (a) : (b)) argument 40 #define MAX(a, b) ((a) > (b) ? (a) : (b)) argument
|