Searched refs:nx_sg (Results 1 - 7 of 7) sorted by relevance

/linux-4.1.27/drivers/crypto/nx/
H A Dnx.h15 struct nx_sg { struct
22 #define NX_MAX_SG_ENTRIES (NX_PAGE_SIZE/(sizeof(struct nx_sg)))
136 struct nx_sg *in_sg; /* aligned pointer into kmem to an sg list */
137 struct nx_sg *out_sg; /* aligned pointer into kmem to an sg list */
164 struct nx_sg *nx_build_sg_list(struct nx_sg *, u8 *, unsigned int *, u32);
168 struct nx_sg *nx_walk_and_build(struct nx_sg *, unsigned int,
H A Dnx.c85 * This function will start writing nx_sg elements at @sg_head and keep
91 struct nx_sg *nx_build_sg_list(struct nx_sg *sg_head, nx_build_sg_list()
97 struct nx_sg *sg; nx_build_sg_list()
111 /* each iteration will write one struct nx_sg element and add the nx_build_sg_list()
115 * as sg_addr, if not, we need to create another nx_sg element for the nx_build_sg_list()
155 * @nx_dst: pointer to the first nx_sg element to write
156 * @sglen: max number of nx_sg entries we're allowed to write
161 struct nx_sg *nx_walk_and_build(struct nx_sg *nx_dst, nx_walk_and_build()
168 struct nx_sg *nx_sg = nx_dst; nx_walk_and_build() local
187 while (len && (nx_sg - nx_dst) < sglen) { nx_walk_and_build()
197 nx_sg = nx_build_sg_list(nx_sg, dst, &n, sglen - (nx_sg - nx_dst)); nx_walk_and_build()
208 return nx_sg; nx_walk_and_build()
218 static long int trim_sg_list(struct nx_sg *sg, trim_sg_list()
219 struct nx_sg *end, trim_sg_list()
228 struct nx_sg *last = end - 1; trim_sg_list()
244 oplen = (sg - end) * sizeof(struct nx_sg); trim_sg_list()
281 struct nx_sg *nx_insg = nx_ctx->in_sg; nx_build_sg_lists()
282 struct nx_sg *nx_outsg = nx_ctx->out_sg; nx_build_sg_lists()
286 nx_driver.of.max_sg_len/sizeof(struct nx_sg)); nx_build_sg_lists()
618 nx_ctx->in_sg = (struct nx_sg *)((u8 *)nx_ctx->csbcpb + NX_PAGE_SIZE); nx_crypto_ctx_init()
619 nx_ctx->out_sg = (struct nx_sg *)((u8 *)nx_ctx->in_sg + NX_PAGE_SIZE); nx_crypto_ctx_init()
H A Dnx-aes-xcbc.c75 struct nx_sg *in_sg, *out_sg; nx_xcbc_empty()
105 nx_ctx->op.inlen = (nx_ctx->in_sg - in_sg) * sizeof(struct nx_sg); nx_xcbc_empty()
106 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); nx_xcbc_empty()
134 nx_ctx->op.inlen = (nx_ctx->in_sg - in_sg) * sizeof(struct nx_sg); nx_xcbc_empty()
135 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); nx_xcbc_empty()
186 struct nx_sg *in_sg; nx_xcbc_update()
187 struct nx_sg *out_sg; nx_xcbc_update()
210 max_sg_len = min_t(u64, nx_driver.of.max_sg_len/sizeof(struct nx_sg), nx_xcbc_update()
224 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); nx_xcbc_update()
266 sizeof(struct nx_sg); nx_xcbc_update()
312 struct nx_sg *in_sg, *out_sg; nx_xcbc_final()
356 nx_ctx->op.inlen = (nx_ctx->in_sg - in_sg) * sizeof(struct nx_sg); nx_xcbc_final()
357 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); nx_xcbc_final()
H A Dnx-sha256.c74 struct nx_sg *out_sg; nx_sha256_update()
100 nx_driver.of.max_sg_len/sizeof(struct nx_sg)); nx_sha256_update()
107 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); nx_sha256_update()
116 struct nx_sg *in_sg = nx_ctx->in_sg; nx_sha256_update()
147 nx_ctx->op.inlen = (nx_ctx->in_sg - in_sg) * sizeof(struct nx_sg); nx_sha256_update()
194 struct nx_sg *in_sg, *out_sg; nx_sha256_final()
203 nx_driver.of.max_sg_len/sizeof(struct nx_sg)); nx_sha256_final()
239 nx_ctx->op.inlen = (nx_ctx->in_sg - in_sg) * sizeof(struct nx_sg); nx_sha256_final()
240 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); nx_sha256_final()
H A Dnx-sha512.c74 struct nx_sg *out_sg; nx_sha512_update()
100 nx_driver.of.max_sg_len/sizeof(struct nx_sg)); nx_sha512_update()
107 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); nx_sha512_update()
116 struct nx_sg *in_sg = nx_ctx->in_sg; nx_sha512_update()
146 nx_ctx->op.inlen = (nx_ctx->in_sg - in_sg) * sizeof(struct nx_sg); nx_sha512_update()
197 struct nx_sg *in_sg, *out_sg; nx_sha512_final()
207 nx_driver.of.max_sg_len/sizeof(struct nx_sg)); nx_sha512_final()
244 nx_ctx->op.inlen = (nx_ctx->in_sg - in_sg) * sizeof(struct nx_sg); nx_sha512_final()
245 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); nx_sha512_final()
H A Dnx-aes-gcm.c131 struct nx_sg *nx_sg = nx_ctx->in_sg; nx_gca() local
146 max_sg_len = min_t(u64, nx_driver.of.max_sg_len/sizeof(struct nx_sg), nx_gca()
161 nx_sg = nx_walk_and_build(nx_ctx->in_sg, max_sg_len, nx_gca()
169 nx_ctx->op_aead.inlen = (nx_ctx->in_sg - nx_sg) nx_gca()
170 * sizeof(struct nx_sg); nx_gca()
198 struct nx_sg *nx_sg; gmac() local
209 max_sg_len = min_t(u64, nx_driver.of.max_sg_len/sizeof(struct nx_sg), gmac()
227 nx_sg = nx_walk_and_build(nx_ctx->in_sg, max_sg_len, gmac()
235 nx_ctx->op.inlen = (nx_ctx->in_sg - nx_sg) gmac()
236 * sizeof(struct nx_sg); gmac()
272 struct nx_sg *in_sg, *out_sg; gcm_empty()
305 nx_ctx->op.inlen = (nx_ctx->in_sg - in_sg) * sizeof(struct nx_sg); gcm_empty()
306 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); gcm_empty()
H A Dnx-aes-ccm.c179 struct nx_sg *nx_insg = nx_ctx->in_sg; generate_pat()
180 struct nx_sg *nx_outsg = nx_ctx->out_sg; generate_pat()
268 sizeof(struct nx_sg); generate_pat()
270 sizeof(struct nx_sg); generate_pat()
292 nx_driver.of.max_sg_len/sizeof(struct nx_sg)); generate_pat()
315 sizeof(struct nx_sg); generate_pat()

Completed in 302 milliseconds