/kernel/linux/linux-5.10/lib/ |
H A D | sg_split.c | 17 struct scatterlist *out_sg; member 80 struct scatterlist *in_sg, *out_sg; in sg_split_phys() local 85 out_sg = split->out_sg; in sg_split_phys() 86 for (j = 0; j < split->nents; j++, out_sg++) { in sg_split_phys() 87 *out_sg = *in_sg; in sg_split_phys() 89 out_sg->offset += split->skip_sg0; in sg_split_phys() 90 out_sg->length -= split->skip_sg0; in sg_split_phys() 92 out_sg->offset = 0; in sg_split_phys() 94 sg_dma_address(out_sg) in sg_split_phys() 106 struct scatterlist *in_sg, *out_sg; sg_split_mapped() local [all...] |
/kernel/linux/linux-6.6/lib/ |
H A D | sg_split.c | 17 struct scatterlist *out_sg; member 80 struct scatterlist *in_sg, *out_sg; in sg_split_phys() local 85 out_sg = split->out_sg; in sg_split_phys() 86 for (j = 0; j < split->nents; j++, out_sg++) { in sg_split_phys() 87 *out_sg = *in_sg; in sg_split_phys() 89 out_sg->offset += split->skip_sg0; in sg_split_phys() 90 out_sg->length -= split->skip_sg0; in sg_split_phys() 92 out_sg->offset = 0; in sg_split_phys() 94 sg_dma_address(out_sg) in sg_split_phys() 106 struct scatterlist *in_sg, *out_sg; sg_split_mapped() local [all...] |
/kernel/linux/linux-5.10/drivers/crypto/nx/ |
H A D | nx-aes-xcbc.c | 63 struct nx_sg *in_sg, *out_sg; in nx_xcbc_empty() local 87 out_sg = nx_build_sg_list(nx_ctx->out_sg, (u8 *) keys, &len, in nx_xcbc_empty() 94 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); in nx_xcbc_empty() 115 out_sg = nx_build_sg_list(nx_ctx->out_sg, out, &len, in nx_xcbc_empty() 122 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); in nx_xcbc_empty() 173 struct nx_sg *out_sg; in nx_xcbc_update() local 297 struct nx_sg *in_sg, *out_sg; nx_xcbc_final() local [all...] |
H A D | nx-sha512.c | 62 struct nx_sg *out_sg; in nx_sha512_update() local 93 out_sg = nx_build_sg_list(nx_ctx->out_sg, (u8 *)sctx->state, in nx_sha512_update() 95 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); in nx_sha512_update() 184 struct nx_sg *in_sg, *out_sg; in nx_sha512_final() local 228 out_sg = nx_build_sg_list(nx_ctx->out_sg, out, &len, in nx_sha512_final() 232 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeo in nx_sha512_final() [all...] |
H A D | nx-sha256.c | 62 struct nx_sg *out_sg; in nx_sha256_update() local 93 out_sg = nx_build_sg_list(nx_ctx->out_sg, (u8 *)sctx->state, in nx_sha256_update() 95 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); in nx_sha256_update() 181 struct nx_sg *in_sg, *out_sg; in nx_sha256_final() local 219 out_sg = nx_build_sg_list(nx_ctx->out_sg, out, &len, max_sg_len); in nx_sha256_final() 227 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeo in nx_sha256_final() [all...] |
H A D | nx-aes-gcm.c | 249 struct nx_sg *in_sg, *out_sg; in gcm_empty() local 276 out_sg = nx_build_sg_list(nx_ctx->out_sg, (u8 *) out, &len, in gcm_empty() 283 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); in gcm_empty()
|
H A D | nx.c | 269 struct nx_sg *nx_outsg = nx_ctx->out_sg; in nx_build_sg_lists() 294 nx_ctx->op.outlen = trim_sg_list(nx_ctx->out_sg, nx_outsg, delta, nbytes); in nx_build_sg_lists() 314 nx_ctx->op.out = __pa(nx_ctx->out_sg); in nx_ctx_init() 322 nx_ctx->op_aead.out = __pa(nx_ctx->out_sg); in nx_ctx_init() 677 nx_ctx->out_sg = (struct nx_sg *)((u8 *)nx_ctx->in_sg + NX_PAGE_SIZE); in nx_crypto_ctx_init() 681 (struct nx_csbcpb *)((u8 *)nx_ctx->out_sg + in nx_crypto_ctx_init() 753 nx_ctx->out_sg = NULL; in nx_crypto_ctx_exit()
|
/kernel/linux/linux-6.6/drivers/crypto/nx/ |
H A D | nx-aes-xcbc.c | 63 struct nx_sg *in_sg, *out_sg; in nx_xcbc_empty() local 87 out_sg = nx_build_sg_list(nx_ctx->out_sg, (u8 *) keys, &len, in nx_xcbc_empty() 94 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); in nx_xcbc_empty() 115 out_sg = nx_build_sg_list(nx_ctx->out_sg, out, &len, in nx_xcbc_empty() 122 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); in nx_xcbc_empty() 173 struct nx_sg *out_sg; in nx_xcbc_update() local 297 struct nx_sg *in_sg, *out_sg; nx_xcbc_final() local [all...] |
H A D | nx-sha512.c | 67 struct nx_sg *out_sg; in nx_sha512_update() local 98 out_sg = nx_build_sg_list(nx_ctx->out_sg, (u8 *)sctx->state, in nx_sha512_update() 100 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); in nx_sha512_update() 189 struct nx_sg *in_sg, *out_sg; in nx_sha512_final() local 233 out_sg = nx_build_sg_list(nx_ctx->out_sg, out, &len, in nx_sha512_final() 237 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeo in nx_sha512_final() [all...] |
H A D | nx-sha256.c | 67 struct nx_sg *out_sg; in nx_sha256_update() local 98 out_sg = nx_build_sg_list(nx_ctx->out_sg, (u8 *)sctx->state, in nx_sha256_update() 100 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); in nx_sha256_update() 186 struct nx_sg *in_sg, *out_sg; in nx_sha256_final() local 224 out_sg = nx_build_sg_list(nx_ctx->out_sg, out, &len, max_sg_len); in nx_sha256_final() 232 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeo in nx_sha256_final() [all...] |
H A D | nx-aes-gcm.c | 249 struct nx_sg *in_sg, *out_sg; in gcm_empty() local 276 out_sg = nx_build_sg_list(nx_ctx->out_sg, (u8 *) out, &len, in gcm_empty() 283 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); in gcm_empty()
|
H A D | nx.c | 270 struct nx_sg *nx_outsg = nx_ctx->out_sg; in nx_build_sg_lists() 295 nx_ctx->op.outlen = trim_sg_list(nx_ctx->out_sg, nx_outsg, delta, nbytes); in nx_build_sg_lists() 315 nx_ctx->op.out = __pa(nx_ctx->out_sg); in nx_ctx_init() 323 nx_ctx->op_aead.out = __pa(nx_ctx->out_sg); in nx_ctx_init() 678 nx_ctx->out_sg = (struct nx_sg *)((u8 *)nx_ctx->in_sg + NX_PAGE_SIZE); in nx_crypto_ctx_init() 682 (struct nx_csbcpb *)((u8 *)nx_ctx->out_sg + in nx_crypto_ctx_init() 754 nx_ctx->out_sg = NULL; in nx_crypto_ctx_exit()
|
/kernel/linux/linux-5.10/drivers/crypto/ |
H A D | omap-aes.c | 269 struct scatterlist *out_sg, in omap_aes_crypt_dma() 279 scatterwalk_start(&dd->out_walk, dd->out_sg); in omap_aes_crypt_dma() 327 tx_out = dmaengine_prep_slave_sg(dd->dma_lch_out, out_sg, in omap_aes_crypt_dma() 377 err = dma_map_sg(dd->dev, dd->out_sg, dd->out_sg_len, in omap_aes_crypt_dma_start() 386 err = omap_aes_crypt_dma(dd, dd->in_sg, dd->out_sg, dd->in_sg_len, in omap_aes_crypt_dma_start() 391 dma_unmap_sg(dd->dev, dd->out_sg, dd->out_sg_len, in omap_aes_crypt_dma_start() 448 dd->out_sg = req->dst; in omap_aes_prepare_req() 461 ret = omap_crypto_align_sg(&dd->out_sg, dd->total, AES_BLOCK_SIZE, in omap_aes_prepare_req() 471 dd->out_sg_len = sg_nents_for_len(dd->out_sg, dd->total); in omap_aes_prepare_req() 512 dma_sync_sg_for_device(dd->dev, dd->out_sg, d in omap_aes_done_task() 267 omap_aes_crypt_dma(struct omap_aes_dev *dd, struct scatterlist *in_sg, struct scatterlist *out_sg, int in_sg_len, int out_sg_len) omap_aes_crypt_dma() argument [all...] |
H A D | omap-des.c | 153 struct scatterlist *out_sg; member 378 struct scatterlist *in_sg, struct scatterlist *out_sg, in omap_des_crypt_dma() 389 scatterwalk_start(&dd->out_walk, dd->out_sg); in omap_des_crypt_dma() 435 tx_out = dmaengine_prep_slave_sg(dd->dma_lch_out, out_sg, out_sg_len, in omap_des_crypt_dma() 474 err = dma_map_sg(dd->dev, dd->out_sg, dd->out_sg_len, in omap_des_crypt_dma_start() 482 err = omap_des_crypt_dma(tfm, dd->in_sg, dd->out_sg, dd->in_sg_len, in omap_des_crypt_dma_start() 486 dma_unmap_sg(dd->dev, dd->out_sg, dd->out_sg_len, in omap_des_crypt_dma_start() 545 dd->out_sg = req->dst; in omap_des_prepare_req() 558 ret = omap_crypto_align_sg(&dd->out_sg, dd->total, DES_BLOCK_SIZE, in omap_des_prepare_req() 568 dd->out_sg_len = sg_nents_for_len(dd->out_sg, d in omap_des_prepare_req() 377 omap_des_crypt_dma(struct crypto_tfm *tfm, struct scatterlist *in_sg, struct scatterlist *out_sg, int in_sg_len, int out_sg_len) omap_des_crypt_dma() argument [all...] |
H A D | omap-aes-gcm.c | 34 dd->out_sg = NULL; in omap_aes_gcm_finish_req() 54 dma_sync_sg_for_device(dd->dev, dd->out_sg, dd->out_sg_len, in omap_aes_gcm_done_task() 57 dma_unmap_sg(dd->dev, dd->out_sg, dd->out_sg_len, DMA_FROM_DEVICE); in omap_aes_gcm_done_task() 60 omap_crypto_cleanup(dd->out_sg, dd->orig_out, in omap_aes_gcm_done_task() 150 dd->out_sg = req->dst; in omap_aes_gcm_copy_buffers() 153 dd->out_sg = scatterwalk_ffwd(sg_arr, req->dst, req->assoclen); in omap_aes_gcm_copy_buffers() 156 if (req->src == req->dst || dd->out_sg == sg_arr) in omap_aes_gcm_copy_buffers() 160 ret = omap_crypto_align_sg(&dd->out_sg, cryptlen, in omap_aes_gcm_copy_buffers() 169 dd->out_sg_len = sg_nents_for_len(dd->out_sg, clen); in omap_aes_gcm_copy_buffers()
|
H A D | atmel-tdes.c | 118 struct scatterlist *out_sg; member 312 dma_unmap_sg(dd->dev, dd->out_sg, 1, DMA_FROM_DEVICE); in atmel_tdes_crypt_pdc_stop() 319 count = atmel_tdes_sg_copy(&dd->out_sg, &dd->out_offset, in atmel_tdes_crypt_pdc_stop() 508 out = IS_ALIGNED((u32)dd->out_sg->offset, sizeof(u32)) && in atmel_tdes_crypt_start() 509 IS_ALIGNED(dd->out_sg->length, dd->ctx->block_size); in atmel_tdes_crypt_start() 512 if (sg_dma_len(dd->in_sg) != sg_dma_len(dd->out_sg)) in atmel_tdes_crypt_start() 519 count = min_t(size_t, count, sg_dma_len(dd->out_sg)); in atmel_tdes_crypt_start() 527 err = dma_map_sg(dd->dev, dd->out_sg, 1, in atmel_tdes_crypt_start() 537 addr_out = sg_dma_address(dd->out_sg); in atmel_tdes_crypt_start() 561 dma_unmap_sg(dd->dev, dd->out_sg, in atmel_tdes_crypt_start() [all...] |
/kernel/linux/linux-6.6/drivers/crypto/ |
H A D | omap-aes.c | 267 struct scatterlist *out_sg, in omap_aes_crypt_dma() 277 scatterwalk_start(&dd->out_walk, dd->out_sg); in omap_aes_crypt_dma() 325 tx_out = dmaengine_prep_slave_sg(dd->dma_lch_out, out_sg, in omap_aes_crypt_dma() 375 err = dma_map_sg(dd->dev, dd->out_sg, dd->out_sg_len, in omap_aes_crypt_dma_start() 384 err = omap_aes_crypt_dma(dd, dd->in_sg, dd->out_sg, dd->in_sg_len, in omap_aes_crypt_dma_start() 389 dma_unmap_sg(dd->dev, dd->out_sg, dd->out_sg_len, in omap_aes_crypt_dma_start() 441 dd->out_sg = req->dst; in omap_aes_prepare_req() 454 ret = omap_crypto_align_sg(&dd->out_sg, dd->total, AES_BLOCK_SIZE, in omap_aes_prepare_req() 464 dd->out_sg_len = sg_nents_for_len(dd->out_sg, dd->total); in omap_aes_prepare_req() 506 dma_sync_sg_for_device(dd->dev, dd->out_sg, d in omap_aes_done_task() 265 omap_aes_crypt_dma(struct omap_aes_dev *dd, struct scatterlist *in_sg, struct scatterlist *out_sg, int in_sg_len, int out_sg_len) omap_aes_crypt_dma() argument [all...] |
H A D | omap-des.c | 148 struct scatterlist *out_sg; member 372 struct scatterlist *in_sg, struct scatterlist *out_sg, in omap_des_crypt_dma() 383 scatterwalk_start(&dd->out_walk, dd->out_sg); in omap_des_crypt_dma() 429 tx_out = dmaengine_prep_slave_sg(dd->dma_lch_out, out_sg, out_sg_len, in omap_des_crypt_dma() 468 err = dma_map_sg(dd->dev, dd->out_sg, dd->out_sg_len, in omap_des_crypt_dma_start() 476 err = omap_des_crypt_dma(tfm, dd->in_sg, dd->out_sg, dd->in_sg_len, in omap_des_crypt_dma_start() 480 dma_unmap_sg(dd->dev, dd->out_sg, dd->out_sg_len, in omap_des_crypt_dma_start() 534 dd->out_sg = req->dst; in omap_des_prepare_req() 547 ret = omap_crypto_align_sg(&dd->out_sg, dd->total, DES_BLOCK_SIZE, in omap_des_prepare_req() 557 dd->out_sg_len = sg_nents_for_len(dd->out_sg, d in omap_des_prepare_req() 371 omap_des_crypt_dma(struct crypto_tfm *tfm, struct scatterlist *in_sg, struct scatterlist *out_sg, int in_sg_len, int out_sg_len) omap_des_crypt_dma() argument [all...] |
H A D | omap-aes-gcm.c | 37 dd->out_sg = NULL; in omap_aes_gcm_finish_req() 57 dma_sync_sg_for_device(dd->dev, dd->out_sg, dd->out_sg_len, in omap_aes_gcm_done_task() 60 dma_unmap_sg(dd->dev, dd->out_sg, dd->out_sg_len, DMA_FROM_DEVICE); in omap_aes_gcm_done_task() 63 omap_crypto_cleanup(dd->out_sg, dd->orig_out, in omap_aes_gcm_done_task() 153 dd->out_sg = req->dst; in omap_aes_gcm_copy_buffers() 156 dd->out_sg = scatterwalk_ffwd(sg_arr, req->dst, req->assoclen); in omap_aes_gcm_copy_buffers() 159 if (req->src == req->dst || dd->out_sg == sg_arr) in omap_aes_gcm_copy_buffers() 163 ret = omap_crypto_align_sg(&dd->out_sg, cryptlen, in omap_aes_gcm_copy_buffers() 172 dd->out_sg_len = sg_nents_for_len(dd->out_sg, clen); in omap_aes_gcm_copy_buffers()
|
H A D | atmel-tdes.c | 118 struct scatterlist *out_sg; member 304 dma_unmap_sg(dd->dev, dd->out_sg, 1, DMA_FROM_DEVICE); in atmel_tdes_crypt_pdc_stop() 311 count = atmel_tdes_sg_copy(&dd->out_sg, &dd->out_offset, in atmel_tdes_crypt_pdc_stop() 498 out = IS_ALIGNED((u32)dd->out_sg->offset, sizeof(u32)) && in atmel_tdes_crypt_start() 499 IS_ALIGNED(dd->out_sg->length, dd->ctx->block_size); in atmel_tdes_crypt_start() 502 if (sg_dma_len(dd->in_sg) != sg_dma_len(dd->out_sg)) in atmel_tdes_crypt_start() 509 count = min_t(size_t, count, sg_dma_len(dd->out_sg)); in atmel_tdes_crypt_start() 517 err = dma_map_sg(dd->dev, dd->out_sg, 1, in atmel_tdes_crypt_start() 527 addr_out = sg_dma_address(dd->out_sg); in atmel_tdes_crypt_start() 551 dma_unmap_sg(dd->dev, dd->out_sg, in atmel_tdes_crypt_start() [all...] |
/kernel/linux/linux-6.6/drivers/crypto/gemini/ |
H A D | sl3516-ce-cipher.c | 31 struct scatterlist *out_sg; in sl3516_ce_need_fallback() local 88 out_sg = areq->dst; in sl3516_ce_need_fallback() 89 while (in_sg && out_sg) { in sl3516_ce_need_fallback() 90 if (in_sg->length != out_sg->length) { in sl3516_ce_need_fallback() 95 out_sg = sg_next(out_sg); in sl3516_ce_need_fallback() 97 if (in_sg || out_sg) in sl3516_ce_need_fallback()
|
/kernel/linux/linux-5.10/drivers/crypto/allwinner/sun8i-ss/ |
H A D | sun8i-ss-cipher.c | 26 struct scatterlist *out_sg = areq->dst; in sun8i_ss_need_fallback() local 58 out_sg = areq->dst; in sun8i_ss_need_fallback() 59 while (in_sg && out_sg) { in sun8i_ss_need_fallback() 60 if (in_sg->length != out_sg->length) in sun8i_ss_need_fallback() 63 out_sg = sg_next(out_sg); in sun8i_ss_need_fallback() 65 if (in_sg || out_sg) in sun8i_ss_need_fallback()
|
/kernel/linux/linux-6.6/drivers/crypto/allwinner/sun8i-ss/ |
H A D | sun8i-ss-cipher.c | 29 struct scatterlist *out_sg = areq->dst; in sun8i_ss_need_fallback() local 77 out_sg = areq->dst; in sun8i_ss_need_fallback() 78 while (in_sg && out_sg) { in sun8i_ss_need_fallback() 79 if (in_sg->length != out_sg->length) in sun8i_ss_need_fallback() 82 out_sg = sg_next(out_sg); in sun8i_ss_need_fallback() 84 if (in_sg || out_sg) in sun8i_ss_need_fallback()
|
/kernel/linux/linux-5.10/drivers/crypto/allwinner/sun4i-ss/ |
H A D | sun4i-ss-cipher.c | 172 struct scatterlist *out_sg = areq->dst; in sun4i_ss_cipher_poll() local 220 while (out_sg && no_chunk == 1) { in sun4i_ss_cipher_poll() 221 if ((out_sg->length | out_sg->offset) & 3u) in sun4i_ss_cipher_poll() 223 out_sg = sg_next(out_sg); in sun4i_ss_cipher_poll()
|
/kernel/linux/linux-6.6/drivers/crypto/allwinner/sun4i-ss/ |
H A D | sun4i-ss-cipher.c | 183 struct scatterlist *out_sg = areq->dst; in sun4i_ss_cipher_poll() local 230 while (out_sg && no_chunk == 1) { in sun4i_ss_cipher_poll() 231 if ((out_sg->length | out_sg->offset) & 3u) in sun4i_ss_cipher_poll() 233 out_sg = sg_next(out_sg); in sun4i_ss_cipher_poll()
|