/Linux-v4.19/drivers/md/ |
D | dm-switch.c | 62 struct switch_ctx *sctx; in alloc_switch_ctx() local 64 sctx = kzalloc(sizeof(struct switch_ctx) + nr_paths * sizeof(struct switch_path), in alloc_switch_ctx() 66 if (!sctx) in alloc_switch_ctx() 69 sctx->ti = ti; in alloc_switch_ctx() 70 sctx->region_size = region_size; in alloc_switch_ctx() 72 ti->private = sctx; in alloc_switch_ctx() 74 return sctx; in alloc_switch_ctx() 79 struct switch_ctx *sctx = ti->private; in alloc_region_table() local 83 if (!(sctx->region_size & (sctx->region_size - 1))) in alloc_region_table() 84 sctx->region_size_bits = __ffs(sctx->region_size); in alloc_region_table() [all …]
|
/Linux-v4.19/include/crypto/ |
D | sha512_base.h | 23 struct sha512_state *sctx = shash_desc_ctx(desc); in sha384_base_init() local 25 sctx->state[0] = SHA384_H0; in sha384_base_init() 26 sctx->state[1] = SHA384_H1; in sha384_base_init() 27 sctx->state[2] = SHA384_H2; in sha384_base_init() 28 sctx->state[3] = SHA384_H3; in sha384_base_init() 29 sctx->state[4] = SHA384_H4; in sha384_base_init() 30 sctx->state[5] = SHA384_H5; in sha384_base_init() 31 sctx->state[6] = SHA384_H6; in sha384_base_init() 32 sctx->state[7] = SHA384_H7; in sha384_base_init() 33 sctx->count[0] = sctx->count[1] = 0; in sha384_base_init() [all …]
|
D | sha256_base.h | 23 struct sha256_state *sctx = shash_desc_ctx(desc); in sha224_base_init() local 25 sctx->state[0] = SHA224_H0; in sha224_base_init() 26 sctx->state[1] = SHA224_H1; in sha224_base_init() 27 sctx->state[2] = SHA224_H2; in sha224_base_init() 28 sctx->state[3] = SHA224_H3; in sha224_base_init() 29 sctx->state[4] = SHA224_H4; in sha224_base_init() 30 sctx->state[5] = SHA224_H5; in sha224_base_init() 31 sctx->state[6] = SHA224_H6; in sha224_base_init() 32 sctx->state[7] = SHA224_H7; in sha224_base_init() 33 sctx->count = 0; in sha224_base_init() [all …]
|
D | sm3_base.h | 30 struct sm3_state *sctx = shash_desc_ctx(desc); in sm3_base_init() local 32 sctx->state[0] = SM3_IVA; in sm3_base_init() 33 sctx->state[1] = SM3_IVB; in sm3_base_init() 34 sctx->state[2] = SM3_IVC; in sm3_base_init() 35 sctx->state[3] = SM3_IVD; in sm3_base_init() 36 sctx->state[4] = SM3_IVE; in sm3_base_init() 37 sctx->state[5] = SM3_IVF; in sm3_base_init() 38 sctx->state[6] = SM3_IVG; in sm3_base_init() 39 sctx->state[7] = SM3_IVH; in sm3_base_init() 40 sctx->count = 0; in sm3_base_init() [all …]
|
D | sha1_base.h | 22 struct sha1_state *sctx = shash_desc_ctx(desc); in sha1_base_init() local 24 sctx->state[0] = SHA1_H0; in sha1_base_init() 25 sctx->state[1] = SHA1_H1; in sha1_base_init() 26 sctx->state[2] = SHA1_H2; in sha1_base_init() 27 sctx->state[3] = SHA1_H3; in sha1_base_init() 28 sctx->state[4] = SHA1_H4; in sha1_base_init() 29 sctx->count = 0; in sha1_base_init() 39 struct sha1_state *sctx = shash_desc_ctx(desc); in sha1_base_do_update() local 40 unsigned int partial = sctx->count % SHA1_BLOCK_SIZE; in sha1_base_do_update() 42 sctx->count += len; in sha1_base_do_update() [all …]
|
/Linux-v4.19/arch/mips/cavium-octeon/crypto/ |
D | octeon-sha512.c | 35 static void octeon_sha512_store_hash(struct sha512_state *sctx) in octeon_sha512_store_hash() argument 37 write_octeon_64bit_hash_sha512(sctx->state[0], 0); in octeon_sha512_store_hash() 38 write_octeon_64bit_hash_sha512(sctx->state[1], 1); in octeon_sha512_store_hash() 39 write_octeon_64bit_hash_sha512(sctx->state[2], 2); in octeon_sha512_store_hash() 40 write_octeon_64bit_hash_sha512(sctx->state[3], 3); in octeon_sha512_store_hash() 41 write_octeon_64bit_hash_sha512(sctx->state[4], 4); in octeon_sha512_store_hash() 42 write_octeon_64bit_hash_sha512(sctx->state[5], 5); in octeon_sha512_store_hash() 43 write_octeon_64bit_hash_sha512(sctx->state[6], 6); in octeon_sha512_store_hash() 44 write_octeon_64bit_hash_sha512(sctx->state[7], 7); in octeon_sha512_store_hash() 47 static void octeon_sha512_read_hash(struct sha512_state *sctx) in octeon_sha512_read_hash() argument [all …]
|
D | octeon-sha256.c | 36 static void octeon_sha256_store_hash(struct sha256_state *sctx) in octeon_sha256_store_hash() argument 38 u64 *hash = (u64 *)sctx->state; in octeon_sha256_store_hash() 46 static void octeon_sha256_read_hash(struct sha256_state *sctx) in octeon_sha256_read_hash() argument 48 u64 *hash = (u64 *)sctx->state; in octeon_sha256_read_hash() 72 struct sha256_state *sctx = shash_desc_ctx(desc); in octeon_sha224_init() local 74 sctx->state[0] = SHA224_H0; in octeon_sha224_init() 75 sctx->state[1] = SHA224_H1; in octeon_sha224_init() 76 sctx->state[2] = SHA224_H2; in octeon_sha224_init() 77 sctx->state[3] = SHA224_H3; in octeon_sha224_init() 78 sctx->state[4] = SHA224_H4; in octeon_sha224_init() [all …]
|
D | octeon-sha1.c | 35 static void octeon_sha1_store_hash(struct sha1_state *sctx) in octeon_sha1_store_hash() argument 37 u64 *hash = (u64 *)sctx->state; in octeon_sha1_store_hash() 41 } hash_tail = { { sctx->state[4], } }; in octeon_sha1_store_hash() 49 static void octeon_sha1_read_hash(struct sha1_state *sctx) in octeon_sha1_read_hash() argument 51 u64 *hash = (u64 *)sctx->state; in octeon_sha1_read_hash() 60 sctx->state[4] = hash_tail.word[0]; in octeon_sha1_read_hash() 80 struct sha1_state *sctx = shash_desc_ctx(desc); in octeon_sha1_init() local 82 sctx->state[0] = SHA1_H0; in octeon_sha1_init() 83 sctx->state[1] = SHA1_H1; in octeon_sha1_init() 84 sctx->state[2] = SHA1_H2; in octeon_sha1_init() [all …]
|
/Linux-v4.19/arch/powerpc/crypto/ |
D | sha256-spe-glue.c | 55 static inline void ppc_sha256_clear_context(struct sha256_state *sctx) in ppc_sha256_clear_context() argument 58 u32 *ptr = (u32 *)sctx; in ppc_sha256_clear_context() 67 struct sha256_state *sctx = shash_desc_ctx(desc); in ppc_spe_sha256_init() local 69 sctx->state[0] = SHA256_H0; in ppc_spe_sha256_init() 70 sctx->state[1] = SHA256_H1; in ppc_spe_sha256_init() 71 sctx->state[2] = SHA256_H2; in ppc_spe_sha256_init() 72 sctx->state[3] = SHA256_H3; in ppc_spe_sha256_init() 73 sctx->state[4] = SHA256_H4; in ppc_spe_sha256_init() 74 sctx->state[5] = SHA256_H5; in ppc_spe_sha256_init() 75 sctx->state[6] = SHA256_H6; in ppc_spe_sha256_init() [all …]
|
D | sha1-spe-glue.c | 54 static inline void ppc_sha1_clear_context(struct sha1_state *sctx) in ppc_sha1_clear_context() argument 57 u32 *ptr = (u32 *)sctx; in ppc_sha1_clear_context() 66 struct sha1_state *sctx = shash_desc_ctx(desc); in ppc_spe_sha1_init() local 68 sctx->state[0] = SHA1_H0; in ppc_spe_sha1_init() 69 sctx->state[1] = SHA1_H1; in ppc_spe_sha1_init() 70 sctx->state[2] = SHA1_H2; in ppc_spe_sha1_init() 71 sctx->state[3] = SHA1_H3; in ppc_spe_sha1_init() 72 sctx->state[4] = SHA1_H4; in ppc_spe_sha1_init() 73 sctx->count = 0; in ppc_spe_sha1_init() 81 struct sha1_state *sctx = shash_desc_ctx(desc); in ppc_spe_sha1_update() local [all …]
|
D | md5-glue.c | 26 static inline void ppc_md5_clear_context(struct md5_state *sctx) in ppc_md5_clear_context() argument 29 u32 *ptr = (u32 *)sctx; in ppc_md5_clear_context() 38 struct md5_state *sctx = shash_desc_ctx(desc); in ppc_md5_init() local 40 sctx->hash[0] = MD5_H0; in ppc_md5_init() 41 sctx->hash[1] = MD5_H1; in ppc_md5_init() 42 sctx->hash[2] = MD5_H2; in ppc_md5_init() 43 sctx->hash[3] = MD5_H3; in ppc_md5_init() 44 sctx->byte_count = 0; in ppc_md5_init() 52 struct md5_state *sctx = shash_desc_ctx(desc); in ppc_md5_update() local 53 const unsigned int offset = sctx->byte_count & 0x3f; in ppc_md5_update() [all …]
|
D | sha1.c | 33 struct sha1_state *sctx = shash_desc_ctx(desc); in sha1_init() local 35 *sctx = (struct sha1_state){ in sha1_init() 45 struct sha1_state *sctx = shash_desc_ctx(desc); in sha1_update() local 49 partial = sctx->count & 0x3f; in sha1_update() 50 sctx->count += len; in sha1_update() 59 memcpy(sctx->buffer + partial, data, done + 64); in sha1_update() 60 src = sctx->buffer; in sha1_update() 64 powerpc_sha_transform(sctx->state, src, temp); in sha1_update() 72 memcpy(sctx->buffer + partial, src, len - done); in sha1_update() 81 struct sha1_state *sctx = shash_desc_ctx(desc); in sha1_final() local [all …]
|
/Linux-v4.19/arch/sparc/crypto/ |
D | sha512_glue.c | 30 struct sha512_state *sctx = shash_desc_ctx(desc); in sha512_sparc64_init() local 31 sctx->state[0] = SHA512_H0; in sha512_sparc64_init() 32 sctx->state[1] = SHA512_H1; in sha512_sparc64_init() 33 sctx->state[2] = SHA512_H2; in sha512_sparc64_init() 34 sctx->state[3] = SHA512_H3; in sha512_sparc64_init() 35 sctx->state[4] = SHA512_H4; in sha512_sparc64_init() 36 sctx->state[5] = SHA512_H5; in sha512_sparc64_init() 37 sctx->state[6] = SHA512_H6; in sha512_sparc64_init() 38 sctx->state[7] = SHA512_H7; in sha512_sparc64_init() 39 sctx->count[0] = sctx->count[1] = 0; in sha512_sparc64_init() [all …]
|
D | sha256_glue.c | 31 struct sha256_state *sctx = shash_desc_ctx(desc); in sha224_sparc64_init() local 32 sctx->state[0] = SHA224_H0; in sha224_sparc64_init() 33 sctx->state[1] = SHA224_H1; in sha224_sparc64_init() 34 sctx->state[2] = SHA224_H2; in sha224_sparc64_init() 35 sctx->state[3] = SHA224_H3; in sha224_sparc64_init() 36 sctx->state[4] = SHA224_H4; in sha224_sparc64_init() 37 sctx->state[5] = SHA224_H5; in sha224_sparc64_init() 38 sctx->state[6] = SHA224_H6; in sha224_sparc64_init() 39 sctx->state[7] = SHA224_H7; in sha224_sparc64_init() 40 sctx->count = 0; in sha224_sparc64_init() [all …]
|
D | sha1_glue.c | 31 struct sha1_state *sctx = shash_desc_ctx(desc); in sha1_sparc64_init() local 33 *sctx = (struct sha1_state){ in sha1_sparc64_init() 40 static void __sha1_sparc64_update(struct sha1_state *sctx, const u8 *data, in __sha1_sparc64_update() argument 45 sctx->count += len; in __sha1_sparc64_update() 48 memcpy(sctx->buffer + partial, data, done); in __sha1_sparc64_update() 49 sha1_sparc64_transform(sctx->state, sctx->buffer, 1); in __sha1_sparc64_update() 54 sha1_sparc64_transform(sctx->state, data + done, rounds); in __sha1_sparc64_update() 58 memcpy(sctx->buffer, data + done, len - done); in __sha1_sparc64_update() 64 struct sha1_state *sctx = shash_desc_ctx(desc); in sha1_sparc64_update() local 65 unsigned int partial = sctx->count % SHA1_BLOCK_SIZE; in sha1_sparc64_update() [all …]
|
D | md5_glue.c | 45 static void __md5_sparc64_update(struct md5_state *sctx, const u8 *data, in __md5_sparc64_update() argument 50 sctx->byte_count += len; in __md5_sparc64_update() 53 memcpy((u8 *)sctx->block + partial, data, done); in __md5_sparc64_update() 54 md5_sparc64_transform(sctx->hash, (u8 *)sctx->block, 1); in __md5_sparc64_update() 59 md5_sparc64_transform(sctx->hash, data + done, rounds); in __md5_sparc64_update() 63 memcpy(sctx->block, data + done, len - done); in __md5_sparc64_update() 69 struct md5_state *sctx = shash_desc_ctx(desc); in md5_sparc64_update() local 70 unsigned int partial = sctx->byte_count % MD5_HMAC_BLOCK_SIZE; in md5_sparc64_update() 74 sctx->byte_count += len; in md5_sparc64_update() 75 memcpy((u8 *)sctx->block + partial, data, len); in md5_sparc64_update() [all …]
|
/Linux-v4.19/fs/btrfs/ |
D | send.c | 264 static void inconsistent_snapshot_error(struct send_ctx *sctx, in inconsistent_snapshot_error() argument 289 btrfs_err(sctx->send_root->fs_info, in inconsistent_snapshot_error() 291 result_string, what, sctx->cmp_key->objectid, in inconsistent_snapshot_error() 292 sctx->send_root->root_key.objectid, in inconsistent_snapshot_error() 293 (sctx->parent_root ? in inconsistent_snapshot_error() 294 sctx->parent_root->root_key.objectid : 0)); in inconsistent_snapshot_error() 297 static int is_waiting_for_move(struct send_ctx *sctx, u64 ino); 300 get_waiting_dir_move(struct send_ctx *sctx, u64 ino); 302 static int is_waiting_for_rm(struct send_ctx *sctx, u64 dir_ino); 304 static int need_send_hole(struct send_ctx *sctx) in need_send_hole() argument [all …]
|
D | scrub.c | 83 struct scrub_ctx *sctx; member 104 struct scrub_ctx *sctx; member 121 struct scrub_ctx *sctx; member 207 static void scrub_pending_bio_inc(struct scrub_ctx *sctx); 208 static void scrub_pending_bio_dec(struct scrub_ctx *sctx); 233 static int scrub_add_page_to_rd_bio(struct scrub_ctx *sctx, 235 static int scrub_pages(struct scrub_ctx *sctx, u64 logical, u64 len, 247 static int scrub_add_page_to_wr_bio(struct scrub_ctx *sctx, 249 static void scrub_wr_submit(struct scrub_ctx *sctx); 254 static void scrub_put_ctx(struct scrub_ctx *sctx); [all …]
|
/Linux-v4.19/arch/s390/crypto/ |
D | sha256_s390.c | 22 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha256_init() local 24 sctx->state[0] = SHA256_H0; in sha256_init() 25 sctx->state[1] = SHA256_H1; in sha256_init() 26 sctx->state[2] = SHA256_H2; in sha256_init() 27 sctx->state[3] = SHA256_H3; in sha256_init() 28 sctx->state[4] = SHA256_H4; in sha256_init() 29 sctx->state[5] = SHA256_H5; in sha256_init() 30 sctx->state[6] = SHA256_H6; in sha256_init() 31 sctx->state[7] = SHA256_H7; in sha256_init() 32 sctx->count = 0; in sha256_init() [all …]
|
D | sha1_s390.c | 32 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha1_init() local 34 sctx->state[0] = SHA1_H0; in sha1_init() 35 sctx->state[1] = SHA1_H1; in sha1_init() 36 sctx->state[2] = SHA1_H2; in sha1_init() 37 sctx->state[3] = SHA1_H3; in sha1_init() 38 sctx->state[4] = SHA1_H4; in sha1_init() 39 sctx->count = 0; in sha1_init() 40 sctx->func = CPACF_KIMD_SHA_1; in sha1_init() 47 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha1_export() local 50 octx->count = sctx->count; in sha1_export() [all …]
|
/Linux-v4.19/arch/arm64/crypto/ |
D | sha3-ce-glue.c | 32 struct sha3_state *sctx = shash_desc_ctx(desc); in sha3_update() local 38 if ((sctx->partial + len) >= sctx->rsiz) { in sha3_update() 41 if (sctx->partial) { in sha3_update() 42 int p = sctx->rsiz - sctx->partial; in sha3_update() 44 memcpy(sctx->buf + sctx->partial, data, p); in sha3_update() 46 sha3_ce_transform(sctx->st, sctx->buf, 1, digest_size); in sha3_update() 51 sctx->partial = 0; in sha3_update() 54 blocks = len / sctx->rsiz; in sha3_update() 55 len %= sctx->rsiz; in sha3_update() 59 sha3_ce_transform(sctx->st, data, blocks, digest_size); in sha3_update() [all …]
|
/Linux-v4.19/crypto/ |
D | sha3_generic.c | 168 struct sha3_state *sctx = shash_desc_ctx(desc); in crypto_sha3_init() local 171 sctx->rsiz = 200 - 2 * digest_size; in crypto_sha3_init() 172 sctx->rsizw = sctx->rsiz / 8; in crypto_sha3_init() 173 sctx->partial = 0; in crypto_sha3_init() 175 memset(sctx->st, 0, sizeof(sctx->st)); in crypto_sha3_init() 183 struct sha3_state *sctx = shash_desc_ctx(desc); in crypto_sha3_update() local 190 if ((sctx->partial + len) > (sctx->rsiz - 1)) { in crypto_sha3_update() 191 if (sctx->partial) { in crypto_sha3_update() 192 done = -sctx->partial; in crypto_sha3_update() 193 memcpy(sctx->buf + sctx->partial, data, in crypto_sha3_update() [all …]
|
/Linux-v4.19/drivers/crypto/nx/ |
D | nx-sha256.c | 51 struct sha256_state *sctx = shash_desc_ctx(desc); in nx_sha256_init() local 53 memset(sctx, 0, sizeof *sctx); in nx_sha256_init() 55 sctx->state[0] = __cpu_to_be32(SHA256_H0); in nx_sha256_init() 56 sctx->state[1] = __cpu_to_be32(SHA256_H1); in nx_sha256_init() 57 sctx->state[2] = __cpu_to_be32(SHA256_H2); in nx_sha256_init() 58 sctx->state[3] = __cpu_to_be32(SHA256_H3); in nx_sha256_init() 59 sctx->state[4] = __cpu_to_be32(SHA256_H4); in nx_sha256_init() 60 sctx->state[5] = __cpu_to_be32(SHA256_H5); in nx_sha256_init() 61 sctx->state[6] = __cpu_to_be32(SHA256_H6); in nx_sha256_init() 62 sctx->state[7] = __cpu_to_be32(SHA256_H7); in nx_sha256_init() [all …]
|
D | nx-sha512.c | 51 struct sha512_state *sctx = shash_desc_ctx(desc); in nx_sha512_init() local 53 memset(sctx, 0, sizeof *sctx); in nx_sha512_init() 55 sctx->state[0] = __cpu_to_be64(SHA512_H0); in nx_sha512_init() 56 sctx->state[1] = __cpu_to_be64(SHA512_H1); in nx_sha512_init() 57 sctx->state[2] = __cpu_to_be64(SHA512_H2); in nx_sha512_init() 58 sctx->state[3] = __cpu_to_be64(SHA512_H3); in nx_sha512_init() 59 sctx->state[4] = __cpu_to_be64(SHA512_H4); in nx_sha512_init() 60 sctx->state[5] = __cpu_to_be64(SHA512_H5); in nx_sha512_init() 61 sctx->state[6] = __cpu_to_be64(SHA512_H6); in nx_sha512_init() 62 sctx->state[7] = __cpu_to_be64(SHA512_H7); in nx_sha512_init() [all …]
|
/Linux-v4.19/arch/x86/crypto/ |
D | poly1305_glue.c | 46 struct poly1305_simd_desc_ctx *sctx = shash_desc_ctx(desc); in poly1305_simd_init() local 48 sctx->uset = false; in poly1305_simd_init() 50 sctx->wset = false; in poly1305_simd_init() 70 struct poly1305_simd_desc_ctx *sctx; in poly1305_simd_blocks() local 74 sctx = container_of(dctx, struct poly1305_simd_desc_ctx, base); in poly1305_simd_blocks() 84 if (unlikely(!sctx->wset)) { in poly1305_simd_blocks() 85 if (!sctx->uset) { in poly1305_simd_blocks() 86 memcpy(sctx->u, dctx->r, sizeof(sctx->u)); in poly1305_simd_blocks() 87 poly1305_simd_mult(sctx->u, dctx->r); in poly1305_simd_blocks() 88 sctx->uset = true; in poly1305_simd_blocks() [all …]
|