/lib/ |
D | crc32.c | 37 # define tole(x) ((__force u32) cpu_to_le32(x)) 43 # define tobe(x) ((__force u32) cpu_to_be32(x)) 57 static inline u32 __pure 58 crc32_body(u32 crc, unsigned char const *buf, size_t len, const u32 (*tab)[256]) 73 const u32 *b; 78 const u32 *t0=tab[0], *t1=tab[1], *t2=tab[2], *t3=tab[3]; 80 const u32 *t4 = tab[4], *t5 = tab[5], *t6 = tab[6], *t7 = tab[7]; 82 u32 q; 99 b = (const u32 *)buf; 146 static inline u32 __pure crc32_le_generic(u32 crc, unsigned char const *p, [all …]
|
D | siphash.c | 214 u64 siphash_1u32(const u32 first, const siphash_key_t *key) in siphash_1u32() 222 u64 siphash_3u32(const u32 first, const u32 second, const u32 third, in siphash_3u32() 253 u32 __hsiphash_aligned(const void *data, size_t len, const hsiphash_key_t *key) in __hsiphash_aligned() 285 u32 __hsiphash_unaligned(const void *data, size_t len, in __hsiphash_unaligned() 323 u32 hsiphash_1u32(const u32 first, const hsiphash_key_t *key) in hsiphash_1u32() 337 u32 hsiphash_2u32(const u32 first, const u32 second, const hsiphash_key_t *key) in hsiphash_2u32() 355 u32 hsiphash_3u32(const u32 first, const u32 second, const u32 third, in hsiphash_3u32() 376 u32 hsiphash_4u32(const u32 first, const u32 second, const u32 third, in hsiphash_4u32() 377 const u32 forth, const hsiphash_key_t *key) in hsiphash_4u32() 401 u32 v0 = 0; \ [all …]
|
D | random32.c | 60 u32 prandom_u32_state(struct rnd_state *state) in prandom_u32_state() 79 u32 prandom_u32(void) in prandom_u32() 82 u32 res; in prandom_u32() 105 while (bytes >= sizeof(u32)) { in prandom_bytes_state() 106 put_unaligned(prandom_u32_state(state), (u32 *) ptr); in prandom_bytes_state() 107 ptr += sizeof(u32); in prandom_bytes_state() 108 bytes -= sizeof(u32); in prandom_bytes_state() 112 u32 rem = prandom_u32_state(state); in prandom_bytes_state() 151 static u32 __extract_hwseed(void) in __extract_hwseed() 161 static void prandom_seed_early(struct rnd_state *state, u32 seed, in prandom_seed_early() [all …]
|
D | win_minmax.c | 29 static u32 minmax_subwin_update(struct minmax *m, u32 win, in minmax_subwin_update() 32 u32 dt = val->t - m->s[0].t; in minmax_subwin_update() 67 u32 minmax_running_max(struct minmax *m, u32 win, u32 t, u32 meas) in minmax_running_max() 85 u32 minmax_running_min(struct minmax *m, u32 win, u32 t, u32 meas) in minmax_running_min()
|
D | sort.c | 61 u32 t = *(u32 *)(a + (n -= 4)); in swap_words_32() 62 *(u32 *)(a + n) = *(u32 *)(b + n); in swap_words_32() 63 *(u32 *)(b + n) = t; in swap_words_32() 92 u32 t = *(u32 *)(a + (n -= 4)); in swap_words_64() 93 *(u32 *)(a + n) = *(u32 *)(b + n); in swap_words_64() 94 *(u32 *)(b + n) = t; 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() 98 *(u32 *)(b + n) = t; in swap_words_64()
|
D | test_hash.c | 27 static u32 __init __attribute_const__ 28 xorshift(u32 seed) in xorshift() 38 mod255(u32 x) in mod255() 49 fill_buf(char *buf, size_t len, u32 seed) in fill_buf() 69 test_int_hash(unsigned long long h64, u32 hash_or[2][33]) in test_int_hash() 72 u32 h0 = (u32)h64, h1, h2; in test_int_hash() 89 u32 const m = ((u32)2 << (k-1)) - 1; /* Low k bits set */ in test_int_hash() 147 u32 string_or = 0, hash_or[2][33] = { { 0, } }; in test_hash_init() 160 u32 h0 = full_name_hash(buf+i, buf+i, j-i); in test_hash_init() 208 u32 const m = ((u32)2 << (i-1)) - 1; /* Low i bits set */ in test_hash_init()
|
D | crc32test.c | 552 u32 crc; /* random starting crc */ 553 u32 start; /* random 6 bit offset in buf */ 554 u32 length; /* random 11 bit length of test */ 555 u32 crc_le; /* expected crc32_le result */ 556 u32 crc_be; /* expected crc32_be result */ 557 u32 crc32c_le; /* expected crc32c_le result */ 674 static u32 crc; in crc32c_test() 717 u32 crc_full; in crc32c_combine_test() 722 u32 crc1, crc2; in crc32c_combine_test() 723 u32 len1 = j, len2 = test[i].length - j; in crc32c_combine_test() [all …]
|
D | iomap_copy.c | 23 u32 __iomem *dst = to; in __iowrite32_copy() 24 const u32 *src = from; in __iowrite32_copy() 25 const u32 *end = src + count; in __iowrite32_copy() 44 u32 *dst = to; in __ioread32_copy() 45 const u32 __iomem *src = from; in __ioread32_copy() 46 const u32 __iomem *end = src + count; in __ioread32_copy()
|
D | stackdepot.c | 53 u32 slabindex : STACK_ALLOC_INDEX_BITS; 54 u32 offset : STACK_ALLOC_OFFSET_BITS; 55 u32 valid : STACK_ALLOC_NULL_PROTECTION_BITS; 61 u32 hash; /* Hash in the hastable */ 62 u32 size; /* Number of frames in the stack */ 100 u32 hash, void **prealloc, gfp_t alloc_flags) in depot_alloc_stack() 150 static inline u32 hash_stack(unsigned long *entries, unsigned int size) in hash_stack() 152 return jhash2((u32 *)entries, in hash_stack() 153 size * sizeof(unsigned long) / sizeof(u32), in hash_stack() 175 u32 hash) in find_stack() [all …]
|
D | libcrc32c.c | 38 u32 crc32c(u32 crc, const void *address, unsigned int length) in crc32c() 41 u32 ret, *ctx = (u32 *)shash_desc_ctx(shash); in crc32c()
|
D | iomap.c | 110 hi = inl(port + sizeof(u32)); in pio_read64_lo_hi() 119 hi = inl(port + sizeof(u32)); in pio_read64_hi_lo() 129 lo = pio_read32be(port + sizeof(u32)); in pio_read64be_lo_hi() 140 lo = pio_read32be(port + sizeof(u32)); in pio_read64be_hi_lo() 201 void iowrite32(u32 val, void __iomem *addr) in iowrite32() 205 void iowrite32be(u32 val, void __iomem *addr) in iowrite32be() 219 outl(val >> 32, port + sizeof(u32)); in pio_write64_lo_hi() 224 outl(val >> 32, port + sizeof(u32)); in pio_write64_hi_lo() 230 pio_write32be(val, port + sizeof(u32)); in pio_write64be_lo_hi() 237 pio_write32be(val, port + sizeof(u32)); in pio_write64be_hi_lo() [all …]
|
D | chacha.c | 15 static void chacha_permute(u32 *x, int nrounds) in chacha_permute() 75 void chacha_block(u32 *state, u8 *stream, int nrounds) in chacha_block() 77 u32 x[16]; in chacha_block() 85 put_unaligned_le32(x[i] + state[i], &stream[i * sizeof(u32)]); in chacha_block() 102 void hchacha_block(const u32 *in, u32 *out, int nrounds) in hchacha_block() 104 u32 x[16]; in hchacha_block()
|
D | checksum.c | 180 static inline u32 from64to32(u64 x) in from64to32() 186 return (u32)x; in from64to32() 192 unsigned long long s = (__force u32)sum; in csum_tcpudp_nofold() 194 s += (__force u32)saddr; in csum_tcpudp_nofold() 195 s += (__force u32)daddr; in csum_tcpudp_nofold()
|
D | rbtree_test.c | 19 u32 key; 23 u32 val; 24 u32 augmented; 35 u32 key = node->key; in insert() 52 u32 key = node->key; in insert_cached() 83 struct test_node, rb, u32, augmented, NODE_VAL) in RB_DECLARE_CALLBACKS_MAX() argument 89 u32 key = node->key; in RB_DECLARE_CALLBACKS_MAX() 90 u32 val = node->val; in RB_DECLARE_CALLBACKS_MAX() 113 u32 key = node->key; in insert_augmented_cached() 114 u32 val = node->val; in insert_augmented_cached() [all …]
|
D | test_overflow.c | 69 DEFINE_TEST_ARRAY(u32) = { 266 DEFINE_TEST_FUNC(u32, "%u"); 341 err |= TEST_ONE_SHIFT(1, 0, u32, 1U << 0, false); in test_overflow_shift() 342 err |= TEST_ONE_SHIFT(1, 20, u32, 1U << 20, false); in test_overflow_shift() 343 err |= TEST_ONE_SHIFT(1, 31, u32, 1U << 31, false); in test_overflow_shift() 344 err |= TEST_ONE_SHIFT(0xFFFFU, 16, u32, 0xFFFFU << 16, false); in test_overflow_shift() 355 err |= TEST_ONE_SHIFT(0, 31, u32, 0, false); in test_overflow_shift() 369 err |= TEST_ONE_SHIFT(1, 32, u32, 0, true); in test_overflow_shift() 385 err |= TEST_ONE_SHIFT(2215151766U, 1, u32, 0, true); in test_overflow_shift() 417 err |= TEST_ONE_SHIFT(0x100000000ULL, 0, u32, 0, true); in test_overflow_shift() [all …]
|
D | test_bitfield.c | 121 CHECK(u32, 0x80000000); in test_variables() 122 CHECK(u32, 0x7f000000); in test_variables() 123 CHECK(u32, 0x07e00000); in test_variables() 124 CHECK(u32, 0x00018000); in test_variables()
|
/lib/crypto/ |
D | aes.c | 91 static u32 mul_by_x(u32 w) in mul_by_x() 93 u32 x = w & 0x7f7f7f7f; in mul_by_x() 94 u32 y = w & 0x80808080; in mul_by_x() 100 static u32 mul_by_x2(u32 w) in mul_by_x2() 102 u32 x = w & 0x3f3f3f3f; in mul_by_x2() 103 u32 y = w & 0x80808080; in mul_by_x2() 104 u32 z = w & 0x40404040; in mul_by_x2() 110 static u32 mix_columns(u32 x) in mix_columns() 120 u32 y = mul_by_x(x) ^ ror32(x, 16); in mix_columns() 125 static u32 inv_mix_columns(u32 x) in inv_mix_columns() [all …]
|
D | arc4.c | 24 u32 a = ctx->S[i]; in arc4_setkey() 39 u32 *const S = ctx->S; in arc4_crypt() 40 u32 x, y, a, b; in arc4_crypt() 41 u32 ty, ta, tb; in arc4_crypt()
|
D | des.c | 100 static const u32 pc2[1024] = { 362 static const u32 S1[64] = { 381 static const u32 S2[64] = { 400 static const u32 S3[64] = { 419 static const u32 S4[64] = { 438 static const u32 S5[64] = { 457 static const u32 S6[64] = { 476 static const u32 S7[64] = { 495 static const u32 S8[64] = { 623 static unsigned long des_ekey(u32 *pe, const u8 *k) in des_ekey() [all …]
|
/lib/dim/ |
D | dim.c | 61 u32 delta_us = ktime_us_delta(end->time, start->time); in dim_calc_stats() 62 u32 npkts = BIT_GAP(BITS_PER_TYPE(u32), end->pkt_ctr, start->pkt_ctr); in dim_calc_stats() 63 u32 nbytes = BIT_GAP(BITS_PER_TYPE(u32), end->byte_ctr, in dim_calc_stats() 65 u32 ncomps = BIT_GAP(BITS_PER_TYPE(u32), end->comp_ctr, in dim_calc_stats()
|
/lib/math/ |
D | reciprocal_div.c | 13 struct reciprocal_value reciprocal_value(u32 d) in reciprocal_value() 23 R.m = (u32)m; in reciprocal_value() 31 struct reciprocal_value_adv reciprocal_value_adv(u32 d, u8 prec) in reciprocal_value_adv() 34 u32 l, post_shift; in reciprocal_value_adv() 62 R.m = (u32)mhigh; in reciprocal_value_adv()
|
D | div64.c | 76 quotient = div_u64_rem(-dividend, abs(divisor), (u32 *)remainder); in div_s64_rem() 81 quotient = div_u64_rem(dividend, abs(divisor), (u32 *)remainder); in div_s64_rem() 104 u32 high = divisor >> 32; in div64_u64_rem() 108 u32 rem32; in div64_u64_rem() 144 u32 high = divisor >> 32; in div64_u64() 188 u32 iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder) in iter_div_u64_rem()
|
/lib/vdso/ |
D | gettimeofday.c | 35 u64 vdso_calc_delta(u64 cycles, u64 last, u64 mask, u32 mult) in vdso_calc_delta() 46 u32 seq; in do_hres() 75 u32 seq; in do_coarse() 88 u32 msk; in __cvdso_clock_gettime_common() 91 if (unlikely((u32) clock >= MAX_CLOCKS)) in __cvdso_clock_gettime_common() 155 tv->tv_usec = (u32)ts.tv_nsec / NSEC_PER_USEC; in __cvdso_gettimeofday() 185 u32 msk; in __cvdso_clock_getres_common() 189 if (unlikely((u32) clock >= MAX_CLOCKS)) in __cvdso_clock_getres_common()
|
/lib/lzo/ |
D | lzo1x_compress.c | 42 u32 dv; in lzo1x_1_do_compress() 43 u32 run_length = 0; in lzo1x_1_do_compress() 88 dv = *((u32 *)ir); in lzo1x_1_do_compress() 187 u32 v; in lzo1x_1_do_compress() 188 v = get_unaligned((const u32 *) (ip + m_len)) ^ in lzo1x_1_do_compress() 189 get_unaligned((const u32 *) (m_pos + m_len)); in lzo1x_1_do_compress() 193 v = get_unaligned((const u32 *) (ip + m_len)) ^ in lzo1x_1_do_compress() 194 get_unaligned((const u32 *) (m_pos + m_len)); in lzo1x_1_do_compress() 198 v = get_unaligned((const u32 *) (ip + m_len)) ^ in lzo1x_1_do_compress() 199 get_unaligned((const u32 *) (m_pos + m_len)); in lzo1x_1_do_compress()
|
D | lzodefs.h | 23 put_unaligned(get_unaligned((const u32 *)(src)), (u32 *)(dst))
|