Home
last modified time | relevance | path

Searched refs:sctx (Results 1 – 25 of 62) sorted by relevance

123

/kernel/linux/linux-5.10/drivers/md/
Ddm-switch.c62 struct switch_ctx *sctx; in alloc_switch_ctx() local
64 sctx = kzalloc(struct_size(sctx, path_list, nr_paths), GFP_KERNEL); in alloc_switch_ctx()
65 if (!sctx) in alloc_switch_ctx()
68 sctx->ti = ti; in alloc_switch_ctx()
69 sctx->region_size = region_size; in alloc_switch_ctx()
71 ti->private = sctx; in alloc_switch_ctx()
73 return sctx; in alloc_switch_ctx()
78 struct switch_ctx *sctx = ti->private; in alloc_region_table() local
82 if (!(sctx->region_size & (sctx->region_size - 1))) in alloc_region_table()
83 sctx->region_size_bits = __ffs(sctx->region_size); in alloc_region_table()
[all …]
/kernel/linux/linux-5.10/include/crypto/
Dsha512_base.h23 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 …]
Dsm3_base.h22 struct sm3_state *sctx = shash_desc_ctx(desc); in sm3_base_init() local
24 sctx->state[0] = SM3_IVA; in sm3_base_init()
25 sctx->state[1] = SM3_IVB; in sm3_base_init()
26 sctx->state[2] = SM3_IVC; in sm3_base_init()
27 sctx->state[3] = SM3_IVD; in sm3_base_init()
28 sctx->state[4] = SM3_IVE; in sm3_base_init()
29 sctx->state[5] = SM3_IVF; in sm3_base_init()
30 sctx->state[6] = SM3_IVG; in sm3_base_init()
31 sctx->state[7] = SM3_IVH; in sm3_base_init()
32 sctx->count = 0; in sm3_base_init()
[all …]
Dsha1_base.h22 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 …]
Dsha256_base.h23 struct sha256_state *sctx = shash_desc_ctx(desc); in sha224_base_init() local
25 sha224_init(sctx); in sha224_base_init()
31 struct sha256_state *sctx = shash_desc_ctx(desc); in sha256_base_init() local
33 sha256_init(sctx); in sha256_base_init()
42 struct sha256_state *sctx = shash_desc_ctx(desc); in sha256_base_do_update() local
43 unsigned int partial = sctx->count % SHA256_BLOCK_SIZE; in sha256_base_do_update()
45 sctx->count += len; in sha256_base_do_update()
53 memcpy(sctx->buf + partial, data, p); in sha256_base_do_update()
57 block_fn(sctx, sctx->buf, 1); in sha256_base_do_update()
64 block_fn(sctx, data, blocks); in sha256_base_do_update()
[all …]
Dsha.h136 static inline void sha256_init(struct sha256_state *sctx) in sha256_init() argument
138 sctx->state[0] = SHA256_H0; in sha256_init()
139 sctx->state[1] = SHA256_H1; in sha256_init()
140 sctx->state[2] = SHA256_H2; in sha256_init()
141 sctx->state[3] = SHA256_H3; in sha256_init()
142 sctx->state[4] = SHA256_H4; in sha256_init()
143 sctx->state[5] = SHA256_H5; in sha256_init()
144 sctx->state[6] = SHA256_H6; in sha256_init()
145 sctx->state[7] = SHA256_H7; in sha256_init()
146 sctx->count = 0; in sha256_init()
[all …]
/kernel/linux/linux-5.10/arch/mips/cavium-octeon/crypto/
Docteon-sha512.c31 static void octeon_sha512_store_hash(struct sha512_state *sctx) in octeon_sha512_store_hash() argument
33 write_octeon_64bit_hash_sha512(sctx->state[0], 0); in octeon_sha512_store_hash()
34 write_octeon_64bit_hash_sha512(sctx->state[1], 1); in octeon_sha512_store_hash()
35 write_octeon_64bit_hash_sha512(sctx->state[2], 2); in octeon_sha512_store_hash()
36 write_octeon_64bit_hash_sha512(sctx->state[3], 3); in octeon_sha512_store_hash()
37 write_octeon_64bit_hash_sha512(sctx->state[4], 4); in octeon_sha512_store_hash()
38 write_octeon_64bit_hash_sha512(sctx->state[5], 5); in octeon_sha512_store_hash()
39 write_octeon_64bit_hash_sha512(sctx->state[6], 6); in octeon_sha512_store_hash()
40 write_octeon_64bit_hash_sha512(sctx->state[7], 7); in octeon_sha512_store_hash()
43 static void octeon_sha512_read_hash(struct sha512_state *sctx) in octeon_sha512_read_hash() argument
[all …]
Docteon-sha256.c32 static void octeon_sha256_store_hash(struct sha256_state *sctx) in octeon_sha256_store_hash() argument
34 u64 *hash = (u64 *)sctx->state; in octeon_sha256_store_hash()
42 static void octeon_sha256_read_hash(struct sha256_state *sctx) in octeon_sha256_read_hash() argument
44 u64 *hash = (u64 *)sctx->state; in octeon_sha256_read_hash()
68 struct sha256_state *sctx = shash_desc_ctx(desc); in octeon_sha224_init() local
70 sctx->state[0] = SHA224_H0; in octeon_sha224_init()
71 sctx->state[1] = SHA224_H1; in octeon_sha224_init()
72 sctx->state[2] = SHA224_H2; in octeon_sha224_init()
73 sctx->state[3] = SHA224_H3; in octeon_sha224_init()
74 sctx->state[4] = SHA224_H4; in octeon_sha224_init()
[all …]
Docteon-sha1.c31 static void octeon_sha1_store_hash(struct sha1_state *sctx) in octeon_sha1_store_hash() argument
33 u64 *hash = (u64 *)sctx->state; in octeon_sha1_store_hash()
37 } hash_tail = { { sctx->state[4], } }; in octeon_sha1_store_hash()
45 static void octeon_sha1_read_hash(struct sha1_state *sctx) in octeon_sha1_read_hash() argument
47 u64 *hash = (u64 *)sctx->state; in octeon_sha1_read_hash()
56 sctx->state[4] = hash_tail.word[0]; in octeon_sha1_read_hash()
76 struct sha1_state *sctx = shash_desc_ctx(desc); in octeon_sha1_init() local
78 sctx->state[0] = SHA1_H0; in octeon_sha1_init()
79 sctx->state[1] = SHA1_H1; in octeon_sha1_init()
80 sctx->state[2] = SHA1_H2; in octeon_sha1_init()
[all …]
/kernel/linux/linux-5.10/arch/powerpc/crypto/
Dsha256-spe-glue.c49 static inline void ppc_sha256_clear_context(struct sha256_state *sctx) in ppc_sha256_clear_context() argument
52 u32 *ptr = (u32 *)sctx; in ppc_sha256_clear_context()
61 struct sha256_state *sctx = shash_desc_ctx(desc); in ppc_spe_sha256_init() local
63 sctx->state[0] = SHA256_H0; in ppc_spe_sha256_init()
64 sctx->state[1] = SHA256_H1; in ppc_spe_sha256_init()
65 sctx->state[2] = SHA256_H2; in ppc_spe_sha256_init()
66 sctx->state[3] = SHA256_H3; in ppc_spe_sha256_init()
67 sctx->state[4] = SHA256_H4; in ppc_spe_sha256_init()
68 sctx->state[5] = SHA256_H5; in ppc_spe_sha256_init()
69 sctx->state[6] = SHA256_H6; in ppc_spe_sha256_init()
[all …]
Dsha1-spe-glue.c48 static inline void ppc_sha1_clear_context(struct sha1_state *sctx) in ppc_sha1_clear_context() argument
51 u32 *ptr = (u32 *)sctx; in ppc_sha1_clear_context()
60 struct sha1_state *sctx = shash_desc_ctx(desc); in ppc_spe_sha1_init() local
62 sctx->state[0] = SHA1_H0; in ppc_spe_sha1_init()
63 sctx->state[1] = SHA1_H1; in ppc_spe_sha1_init()
64 sctx->state[2] = SHA1_H2; in ppc_spe_sha1_init()
65 sctx->state[3] = SHA1_H3; in ppc_spe_sha1_init()
66 sctx->state[4] = SHA1_H4; in ppc_spe_sha1_init()
67 sctx->count = 0; in ppc_spe_sha1_init()
75 struct sha1_state *sctx = shash_desc_ctx(desc); in ppc_spe_sha1_update() local
[all …]
Dmd5-glue.c20 static inline void ppc_md5_clear_context(struct md5_state *sctx) in ppc_md5_clear_context() argument
23 u32 *ptr = (u32 *)sctx; in ppc_md5_clear_context()
32 struct md5_state *sctx = shash_desc_ctx(desc); in ppc_md5_init() local
34 sctx->hash[0] = MD5_H0; in ppc_md5_init()
35 sctx->hash[1] = MD5_H1; in ppc_md5_init()
36 sctx->hash[2] = MD5_H2; in ppc_md5_init()
37 sctx->hash[3] = MD5_H3; in ppc_md5_init()
38 sctx->byte_count = 0; in ppc_md5_init()
46 struct md5_state *sctx = shash_desc_ctx(desc); in ppc_md5_update() local
47 const unsigned int offset = sctx->byte_count & 0x3f; in ppc_md5_update()
[all …]
Dsha1.c27 struct sha1_state *sctx = shash_desc_ctx(desc); in powerpc_sha1_init() local
29 *sctx = (struct sha1_state){ in powerpc_sha1_init()
39 struct sha1_state *sctx = shash_desc_ctx(desc); in powerpc_sha1_update() local
43 partial = sctx->count & 0x3f; in powerpc_sha1_update()
44 sctx->count += len; in powerpc_sha1_update()
52 memcpy(sctx->buffer + partial, data, done + 64); in powerpc_sha1_update()
53 src = sctx->buffer; in powerpc_sha1_update()
57 powerpc_sha_transform(sctx->state, src); in powerpc_sha1_update()
64 memcpy(sctx->buffer + partial, src, len - done); in powerpc_sha1_update()
73 struct sha1_state *sctx = shash_desc_ctx(desc); in powerpc_sha1_final() local
[all …]
/kernel/linux/linux-5.10/arch/sparc/crypto/
Dsha512_glue.c30 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 …]
Dsha256_glue.c31 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 …]
Dsha1_glue.c31 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 …]
Dmd5_glue.c45 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 …]
/kernel/linux/linux-5.10/fs/btrfs/
Dsend.c282 static void inconsistent_snapshot_error(struct send_ctx *sctx, in inconsistent_snapshot_error() argument
307 btrfs_err(sctx->send_root->fs_info, in inconsistent_snapshot_error()
309 result_string, what, sctx->cmp_key->objectid, in inconsistent_snapshot_error()
310 sctx->send_root->root_key.objectid, in inconsistent_snapshot_error()
311 (sctx->parent_root ? in inconsistent_snapshot_error()
312 sctx->parent_root->root_key.objectid : 0)); in inconsistent_snapshot_error()
315 static int is_waiting_for_move(struct send_ctx *sctx, u64 ino);
318 get_waiting_dir_move(struct send_ctx *sctx, u64 ino);
320 static int is_waiting_for_rm(struct send_ctx *sctx, u64 dir_ino, u64 gen);
322 static int need_send_hole(struct send_ctx *sctx) in need_send_hole() argument
[all …]
Dscrub.c86 struct scrub_ctx *sctx; member
107 struct scrub_ctx *sctx; member
124 struct scrub_ctx *sctx; member
210 static void scrub_pending_bio_inc(struct scrub_ctx *sctx);
211 static void scrub_pending_bio_dec(struct scrub_ctx *sctx);
236 static int scrub_add_page_to_rd_bio(struct scrub_ctx *sctx,
238 static int scrub_pages(struct scrub_ctx *sctx, u64 logical, u64 len,
250 static int scrub_add_page_to_wr_bio(struct scrub_ctx *sctx,
252 static void scrub_wr_submit(struct scrub_ctx *sctx);
257 static void scrub_put_ctx(struct scrub_ctx *sctx);
[all …]
/kernel/linux/linux-5.10/arch/s390/crypto/
Dsha256_s390.c22 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in s390_sha256_init() local
24 sctx->state[0] = SHA256_H0; in s390_sha256_init()
25 sctx->state[1] = SHA256_H1; in s390_sha256_init()
26 sctx->state[2] = SHA256_H2; in s390_sha256_init()
27 sctx->state[3] = SHA256_H3; in s390_sha256_init()
28 sctx->state[4] = SHA256_H4; in s390_sha256_init()
29 sctx->state[5] = SHA256_H5; in s390_sha256_init()
30 sctx->state[6] = SHA256_H6; in s390_sha256_init()
31 sctx->state[7] = SHA256_H7; in s390_sha256_init()
32 sctx->count = 0; in s390_sha256_init()
[all …]
Dsha3_512_s390.c22 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha3_512_init() local
24 memset(sctx->state, 0, sizeof(sctx->state)); in sha3_512_init()
25 sctx->count = 0; in sha3_512_init()
26 sctx->func = CPACF_KIMD_SHA3_512; in sha3_512_init()
33 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha3_512_export() local
36 octx->rsiz = sctx->count; in sha3_512_export()
37 octx->rsizw = sctx->count >> 32; in sha3_512_export()
39 memcpy(octx->st, sctx->state, sizeof(octx->st)); in sha3_512_export()
40 memcpy(octx->buf, sctx->buf, sizeof(octx->buf)); in sha3_512_export()
47 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha3_512_import() local
[all …]
Dsha3_256_s390.c23 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha3_256_init() local
25 memset(sctx->state, 0, sizeof(sctx->state)); in sha3_256_init()
26 sctx->count = 0; in sha3_256_init()
27 sctx->func = CPACF_KIMD_SHA3_256; in sha3_256_init()
34 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha3_256_export() local
37 octx->rsiz = sctx->count; in sha3_256_export()
38 memcpy(octx->st, sctx->state, sizeof(octx->st)); in sha3_256_export()
39 memcpy(octx->buf, sctx->buf, sizeof(octx->buf)); in sha3_256_export()
46 struct s390_sha_ctx *sctx = shash_desc_ctx(desc); in sha3_256_import() local
49 sctx->count = ictx->rsiz; in sha3_256_import()
[all …]
/kernel/linux/linux-5.10/arch/arm64/crypto/
Dsha3-ce-glue.c37 struct sha3_state *sctx = shash_desc_ctx(desc); in sha3_update() local
43 if ((sctx->partial + len) >= sctx->rsiz) { in sha3_update()
46 if (sctx->partial) { in sha3_update()
47 int p = sctx->rsiz - sctx->partial; in sha3_update()
49 memcpy(sctx->buf + sctx->partial, data, p); in sha3_update()
51 sha3_ce_transform(sctx->st, sctx->buf, 1, digest_size); in sha3_update()
56 sctx->partial = 0; in sha3_update()
59 blocks = len / sctx->rsiz; in sha3_update()
60 len %= sctx->rsiz; in sha3_update()
66 rem = sha3_ce_transform(sctx->st, data, blocks, in sha3_update()
[all …]
/kernel/linux/linux-5.10/crypto/
Dsha3_generic.c163 struct sha3_state *sctx = shash_desc_ctx(desc); in crypto_sha3_init() local
166 sctx->rsiz = 200 - 2 * digest_size; in crypto_sha3_init()
167 sctx->rsizw = sctx->rsiz / 8; in crypto_sha3_init()
168 sctx->partial = 0; in crypto_sha3_init()
170 memset(sctx->st, 0, sizeof(sctx->st)); in crypto_sha3_init()
178 struct sha3_state *sctx = shash_desc_ctx(desc); in crypto_sha3_update() local
185 if ((sctx->partial + len) > (sctx->rsiz - 1)) { in crypto_sha3_update()
186 if (sctx->partial) { in crypto_sha3_update()
187 done = -sctx->partial; in crypto_sha3_update()
188 memcpy(sctx->buf + sctx->partial, data, in crypto_sha3_update()
[all …]
/kernel/linux/linux-5.10/drivers/crypto/nx/
Dnx-sha512.c39 struct sha512_state *sctx = shash_desc_ctx(desc); in nx_sha512_init() local
41 memset(sctx, 0, sizeof *sctx); in nx_sha512_init()
43 sctx->state[0] = __cpu_to_be64(SHA512_H0); in nx_sha512_init()
44 sctx->state[1] = __cpu_to_be64(SHA512_H1); in nx_sha512_init()
45 sctx->state[2] = __cpu_to_be64(SHA512_H2); in nx_sha512_init()
46 sctx->state[3] = __cpu_to_be64(SHA512_H3); in nx_sha512_init()
47 sctx->state[4] = __cpu_to_be64(SHA512_H4); in nx_sha512_init()
48 sctx->state[5] = __cpu_to_be64(SHA512_H5); in nx_sha512_init()
49 sctx->state[6] = __cpu_to_be64(SHA512_H6); in nx_sha512_init()
50 sctx->state[7] = __cpu_to_be64(SHA512_H7); in nx_sha512_init()
[all …]

123