Searched refs:pd_uinfo (Results 1 - 2 of 2) sorted by relevance

/linux-4.1.27/drivers/crypto/amcc/
H A Dcrypto4xx_core.c194 struct pd_uinfo *pd_uinfo; crypto4xx_build_pdr() local
201 dev->pdr_uinfo = kzalloc(sizeof(struct pd_uinfo) * PPC4XX_NUM_PD, crypto4xx_build_pdr()
224 pd_uinfo = (struct pd_uinfo *) (dev->pdr_uinfo + crypto4xx_build_pdr()
225 sizeof(struct pd_uinfo) * i); crypto4xx_build_pdr()
228 pd_uinfo->sa_va = dev->shadow_sa_pool + 256 * i; crypto4xx_build_pdr()
229 pd_uinfo->sa_pa = dev->shadow_sa_pool_pa + 256 * i; crypto4xx_build_pdr()
232 pd_uinfo->sr_va = dev->shadow_sr_pool + crypto4xx_build_pdr()
234 pd_uinfo->sr_pa = dev->shadow_sr_pool_pa + crypto4xx_build_pdr()
276 struct pd_uinfo *pd_uinfo; crypto4xx_put_pd_to_pdr() local
279 pd_uinfo = (struct pd_uinfo *)(dev->pdr_uinfo + crypto4xx_put_pd_to_pdr()
280 sizeof(struct pd_uinfo) * idx); crypto4xx_put_pd_to_pdr()
286 pd_uinfo->state = PD_ENTRY_FREE; crypto4xx_put_pd_to_pdr()
541 struct pd_uinfo *pd_uinfo, crypto4xx_copy_pkt_to_dst()
553 this_sd = pd_uinfo->first_sd; crypto4xx_copy_pkt_to_dst()
592 static u32 crypto4xx_copy_digest_to_dst(struct pd_uinfo *pd_uinfo, crypto4xx_copy_digest_to_dst() argument
597 (struct sa_state_record *) pd_uinfo->sr_va; crypto4xx_copy_digest_to_dst()
600 memcpy((void *) pd_uinfo->dest_va, state_record->save_digest, crypto4xx_copy_digest_to_dst()
608 struct pd_uinfo *pd_uinfo) crypto4xx_ret_sg_desc()
611 if (pd_uinfo->num_gd) { crypto4xx_ret_sg_desc()
612 for (i = 0; i < pd_uinfo->num_gd; i++) crypto4xx_ret_sg_desc()
614 pd_uinfo->first_gd = 0xffffffff; crypto4xx_ret_sg_desc()
615 pd_uinfo->num_gd = 0; crypto4xx_ret_sg_desc()
617 if (pd_uinfo->num_sd) { crypto4xx_ret_sg_desc()
618 for (i = 0; i < pd_uinfo->num_sd; i++) crypto4xx_ret_sg_desc()
621 pd_uinfo->first_sd = 0xffffffff; crypto4xx_ret_sg_desc()
622 pd_uinfo->num_sd = 0; crypto4xx_ret_sg_desc()
627 struct pd_uinfo *pd_uinfo, crypto4xx_ablkcipher_done()
635 ablk_req = ablkcipher_request_cast(pd_uinfo->async_req); crypto4xx_ablkcipher_done()
638 if (pd_uinfo->using_sd) { crypto4xx_ablkcipher_done()
639 crypto4xx_copy_pkt_to_dst(dev, pd, pd_uinfo, ablk_req->nbytes, crypto4xx_ablkcipher_done()
642 dst = pd_uinfo->dest_va; crypto4xx_ablkcipher_done()
646 crypto4xx_ret_sg_desc(dev, pd_uinfo); crypto4xx_ablkcipher_done()
654 struct pd_uinfo *pd_uinfo) crypto4xx_ahash_done()
659 ahash_req = ahash_request_cast(pd_uinfo->async_req); crypto4xx_ahash_done()
662 crypto4xx_copy_digest_to_dst(pd_uinfo, crypto4xx_ahash_done()
664 crypto4xx_ret_sg_desc(dev, pd_uinfo); crypto4xx_ahash_done()
675 struct pd_uinfo *pd_uinfo; crypto4xx_pd_done() local
678 pd_uinfo = dev->pdr_uinfo + sizeof(struct pd_uinfo)*idx; crypto4xx_pd_done()
679 if (crypto_tfm_alg_type(pd_uinfo->async_req->tfm) == crypto4xx_pd_done()
681 return crypto4xx_ablkcipher_done(dev, pd_uinfo, pd); crypto4xx_pd_done()
683 return crypto4xx_ahash_done(dev, pd_uinfo); crypto4xx_pd_done()
734 struct pd_uinfo *pd_uinfo) crypto4xx_return_pd()
740 pd_uinfo->state = PD_ENTRY_FREE; crypto4xx_return_pd()
797 struct pd_uinfo *pd_uinfo = NULL; crypto4xx_build_pd() local
854 pd_uinfo = (struct pd_uinfo *)(dev->pdr_uinfo + crypto4xx_build_pd()
855 sizeof(struct pd_uinfo) * pd_entry); crypto4xx_build_pd()
857 pd_uinfo->async_req = req; crypto4xx_build_pd()
858 pd_uinfo->num_gd = num_gd; crypto4xx_build_pd()
859 pd_uinfo->num_sd = num_sd; crypto4xx_build_pd()
863 pd->sa = pd_uinfo->sa_pa; crypto4xx_build_pd()
864 sa = (struct dynamic_sa_ctl *) pd_uinfo->sa_va; crypto4xx_build_pd()
871 &pd_uinfo->sr_pa, 4); crypto4xx_build_pd()
874 crypto4xx_memcpy_le(pd_uinfo->sr_va, iv, iv_len); crypto4xx_build_pd()
888 pd_uinfo->first_gd = fst_gd; crypto4xx_build_pd()
889 pd_uinfo->num_gd = num_gd; crypto4xx_build_pd()
922 pd_uinfo->first_gd = 0xffffffff; crypto4xx_build_pd()
923 pd_uinfo->num_gd = 0; crypto4xx_build_pd()
931 pd_uinfo->using_sd = 0; crypto4xx_build_pd()
932 pd_uinfo->first_sd = 0xffffffff; crypto4xx_build_pd()
933 pd_uinfo->num_sd = 0; crypto4xx_build_pd()
934 pd_uinfo->dest_va = dst; crypto4xx_build_pd()
947 pd_uinfo->using_sd = 1; crypto4xx_build_pd()
948 pd_uinfo->dest_va = dst; crypto4xx_build_pd()
949 pd_uinfo->first_sd = fst_sd; crypto4xx_build_pd()
950 pd_uinfo->num_sd = num_sd; crypto4xx_build_pd()
982 pd_uinfo->state = PD_ENTRY_INUSE; crypto4xx_build_pd()
1085 struct pd_uinfo *pd_uinfo; crypto4xx_bh_tasklet_cb() local
1091 pd_uinfo = core_dev->dev->pdr_uinfo + crypto4xx_bh_tasklet_cb()
1092 sizeof(struct pd_uinfo)*tail; crypto4xx_bh_tasklet_cb()
1094 if ((pd_uinfo->state == PD_ENTRY_INUSE) && crypto4xx_bh_tasklet_cb()
1100 pd_uinfo->state = PD_ENTRY_FREE; crypto4xx_bh_tasklet_cb()
539 crypto4xx_copy_pkt_to_dst(struct crypto4xx_device *dev, struct ce_pd *pd, struct pd_uinfo *pd_uinfo, u32 nbytes, struct scatterlist *dst) crypto4xx_copy_pkt_to_dst() argument
607 crypto4xx_ret_sg_desc(struct crypto4xx_device *dev, struct pd_uinfo *pd_uinfo) crypto4xx_ret_sg_desc() argument
626 crypto4xx_ablkcipher_done(struct crypto4xx_device *dev, struct pd_uinfo *pd_uinfo, struct ce_pd *pd) crypto4xx_ablkcipher_done() argument
653 crypto4xx_ahash_done(struct crypto4xx_device *dev, struct pd_uinfo *pd_uinfo) crypto4xx_ahash_done() argument
732 crypto4xx_return_pd(struct crypto4xx_device *dev, u32 pd_entry, struct ce_pd *pd, struct pd_uinfo *pd_uinfo) crypto4xx_return_pd() argument
H A Dcrypto4xx_core.h49 struct pd_uinfo { struct
90 void *shadow_sa_pool; /* pool of memory for sa in pd_uinfo */
92 void *shadow_sr_pool; /* pool of memory for sr in pd_uinfo */

Completed in 143 milliseconds