req = container_of(cpt_req->areq, struct aead_request, base);
        tfm = crypto_aead_reqtfm(req);
-       rctx = aead_request_ctx(req);
+       rctx = aead_request_ctx_dma(req);
        if (memcmp(rctx->fctx.hmac.s.hmac_calc,
                   rctx->fctx.hmac.s.hmac_recv,
                   crypto_aead_authsize(tfm)) != 0)
        ctx = crypto_skcipher_ctx(stfm);
        if (ctx->cipher_type == OTX2_CPT_AES_CBC ||
            ctx->cipher_type == OTX2_CPT_DES3_CBC) {
-               rctx = skcipher_request_ctx(sreq);
+               rctx = skcipher_request_ctx_dma(sreq);
                req_info = &rctx->cpt_req;
                ivsize = crypto_skcipher_ivsize(stfm);
                start = sreq->cryptlen - ivsize;
                                 u32 *argcnt)
 {
        struct crypto_skcipher *stfm = crypto_skcipher_reqtfm(req);
-       struct otx2_cpt_req_ctx *rctx = skcipher_request_ctx(req);
+       struct otx2_cpt_req_ctx *rctx = skcipher_request_ctx_dma(req);
        struct otx2_cpt_enc_ctx *ctx = crypto_skcipher_ctx(stfm);
        struct otx2_cpt_req_info *req_info = &rctx->cpt_req;
        struct otx2_cpt_fc_ctx *fctx = &rctx->fctx;
 static inline int create_input_list(struct skcipher_request *req, u32 enc,
                                    u32 enc_iv_len)
 {
-       struct otx2_cpt_req_ctx *rctx = skcipher_request_ctx(req);
+       struct otx2_cpt_req_ctx *rctx = skcipher_request_ctx_dma(req);
        struct otx2_cpt_req_info *req_info = &rctx->cpt_req;
        u32 argcnt =  0;
        int ret;
 static inline void create_output_list(struct skcipher_request *req,
                                      u32 enc_iv_len)
 {
-       struct otx2_cpt_req_ctx *rctx = skcipher_request_ctx(req);
+       struct otx2_cpt_req_ctx *rctx = skcipher_request_ctx_dma(req);
        struct otx2_cpt_req_info *req_info = &rctx->cpt_req;
        u32 argcnt = 0;
 
 static int skcipher_do_fallback(struct skcipher_request *req, bool is_enc)
 {
        struct crypto_skcipher *stfm = crypto_skcipher_reqtfm(req);
-       struct otx2_cpt_req_ctx *rctx = skcipher_request_ctx(req);
+       struct otx2_cpt_req_ctx *rctx = skcipher_request_ctx_dma(req);
        struct otx2_cpt_enc_ctx *ctx = crypto_skcipher_ctx(stfm);
        int ret;
 
 static inline int cpt_enc_dec(struct skcipher_request *req, u32 enc)
 {
        struct crypto_skcipher *stfm = crypto_skcipher_reqtfm(req);
-       struct otx2_cpt_req_ctx *rctx = skcipher_request_ctx(req);
+       struct otx2_cpt_req_ctx *rctx = skcipher_request_ctx_dma(req);
        struct otx2_cpt_enc_ctx *ctx = crypto_skcipher_ctx(stfm);
        struct otx2_cpt_req_info *req_info = &rctx->cpt_req;
        u32 enc_iv_len = crypto_skcipher_ivsize(stfm);
         * allocated since the cryptd daemon uses
         * this memory for request_ctx information
         */
-       crypto_skcipher_set_reqsize(stfm, sizeof(struct otx2_cpt_req_ctx) +
-                                       sizeof(struct skcipher_request));
+       crypto_skcipher_set_reqsize_dma(
+               stfm, sizeof(struct otx2_cpt_req_ctx) +
+                     sizeof(struct skcipher_request));
 
        return cpt_skcipher_fallback_init(ctx, alg);
 }
 
 static int cpt_aead_init(struct crypto_aead *atfm, u8 cipher_type, u8 mac_type)
 {
-       struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx(atfm);
+       struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(atfm);
        struct crypto_tfm *tfm = crypto_aead_tfm(atfm);
        struct crypto_alg *alg = tfm->__crt_alg;
 
                ctx->enc_align_len = 1;
                break;
        }
-       crypto_aead_set_reqsize(atfm, sizeof(struct otx2_cpt_req_ctx));
+       crypto_aead_set_reqsize_dma(atfm, sizeof(struct otx2_cpt_req_ctx));
 
        return cpt_aead_fallback_init(ctx, alg);
 }
 
 static void otx2_cpt_aead_exit(struct crypto_aead *tfm)
 {
-       struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx(tfm);
+       struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(tfm);
 
        kfree(ctx->ipad);
        kfree(ctx->opad);
 static int otx2_cpt_aead_gcm_set_authsize(struct crypto_aead *tfm,
                                          unsigned int authsize)
 {
-       struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx(tfm);
+       struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(tfm);
 
        if (crypto_rfc4106_check_authsize(authsize))
                return -EINVAL;
 static int otx2_cpt_aead_null_set_authsize(struct crypto_aead *tfm,
                                           unsigned int authsize)
 {
-       struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx(tfm);
+       struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(tfm);
 
        ctx->is_trunc_hmac = true;
        tfm->authsize = authsize;
 
 static int aead_hmac_init(struct crypto_aead *cipher)
 {
-       struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx(cipher);
+       struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(cipher);
        int state_size = crypto_shash_statesize(ctx->hashalg);
        int ds = crypto_shash_digestsize(ctx->hashalg);
        int bs = crypto_shash_blocksize(ctx->hashalg);
                                            const unsigned char *key,
                                            unsigned int keylen)
 {
-       struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx(cipher);
+       struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(cipher);
        struct crypto_authenc_key_param *param;
        int enckeylen = 0, authkeylen = 0;
        struct rtattr *rta = (void *)key;
                                             const unsigned char *key,
                                             unsigned int keylen)
 {
-       struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx(cipher);
+       struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(cipher);
        struct crypto_authenc_key_param *param;
        struct rtattr *rta = (void *)key;
        int enckeylen = 0;
                                        const unsigned char *key,
                                        unsigned int keylen)
 {
-       struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx(cipher);
+       struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(cipher);
 
        /*
         * For aes gcm we expect to get encryption key (16, 24, 32 bytes)
 static inline int create_aead_ctx_hdr(struct aead_request *req, u32 enc,
                                      u32 *argcnt)
 {
-       struct otx2_cpt_req_ctx *rctx = aead_request_ctx(req);
+       struct otx2_cpt_req_ctx *rctx = aead_request_ctx_dma(req);
        struct crypto_aead *tfm = crypto_aead_reqtfm(req);
-       struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx(tfm);
+       struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(tfm);
        struct otx2_cpt_req_info *req_info = &rctx->cpt_req;
        struct otx2_cpt_fc_ctx *fctx = &rctx->fctx;
        int mac_len = crypto_aead_authsize(tfm);
 static inline void create_hmac_ctx_hdr(struct aead_request *req, u32 *argcnt,
                                      u32 enc)
 {
-       struct otx2_cpt_req_ctx *rctx = aead_request_ctx(req);
+       struct otx2_cpt_req_ctx *rctx = aead_request_ctx_dma(req);
        struct crypto_aead *tfm = crypto_aead_reqtfm(req);
-       struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx(tfm);
+       struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(tfm);
        struct otx2_cpt_req_info *req_info = &rctx->cpt_req;
 
        req_info->ctrl.s.dma_mode = OTX2_CPT_DMA_MODE_SG;
 
 static inline int create_aead_input_list(struct aead_request *req, u32 enc)
 {
-       struct otx2_cpt_req_ctx *rctx = aead_request_ctx(req);
+       struct otx2_cpt_req_ctx *rctx = aead_request_ctx_dma(req);
        struct otx2_cpt_req_info *req_info = &rctx->cpt_req;
        u32 inputlen =  req->cryptlen + req->assoclen;
        u32 status, argcnt = 0;
 static inline void create_aead_output_list(struct aead_request *req, u32 enc,
                                           u32 mac_len)
 {
-       struct otx2_cpt_req_ctx *rctx = aead_request_ctx(req);
+       struct otx2_cpt_req_ctx *rctx = aead_request_ctx_dma(req);
        struct otx2_cpt_req_info *req_info =  &rctx->cpt_req;
        u32 argcnt = 0, outputlen = 0;
 
 static inline void create_aead_null_input_list(struct aead_request *req,
                                               u32 enc, u32 mac_len)
 {
-       struct otx2_cpt_req_ctx *rctx = aead_request_ctx(req);
+       struct otx2_cpt_req_ctx *rctx = aead_request_ctx_dma(req);
        struct otx2_cpt_req_info *req_info = &rctx->cpt_req;
        u32 inputlen, argcnt = 0;
 
 static inline int create_aead_null_output_list(struct aead_request *req,
                                               u32 enc, u32 mac_len)
 {
-       struct otx2_cpt_req_ctx *rctx = aead_request_ctx(req);
+       struct otx2_cpt_req_ctx *rctx = aead_request_ctx_dma(req);
        struct otx2_cpt_req_info *req_info =  &rctx->cpt_req;
        struct scatterlist *dst;
        u8 *ptr = NULL;
 
 static int aead_do_fallback(struct aead_request *req, bool is_enc)
 {
-       struct otx2_cpt_req_ctx *rctx = aead_request_ctx(req);
+       struct otx2_cpt_req_ctx *rctx = aead_request_ctx_dma(req);
        struct crypto_aead *aead = crypto_aead_reqtfm(req);
-       struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx(aead);
+       struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(aead);
        int ret;
 
        if (ctx->fbk_cipher) {
 
 static int cpt_aead_enc_dec(struct aead_request *req, u8 reg_type, u8 enc)
 {
-       struct otx2_cpt_req_ctx *rctx = aead_request_ctx(req);
+       struct otx2_cpt_req_ctx *rctx = aead_request_ctx_dma(req);
        struct otx2_cpt_req_info *req_info = &rctx->cpt_req;
        struct crypto_aead *tfm = crypto_aead_reqtfm(req);
-       struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx(tfm);
+       struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(tfm);
        struct pci_dev *pdev;
        int status, cpu_num;
 
                .cra_driver_name = "cpt_hmac_sha1_cbc_aes",
                .cra_blocksize = AES_BLOCK_SIZE,
                .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK,
-               .cra_ctxsize = sizeof(struct otx2_cpt_aead_ctx),
+               .cra_ctxsize = sizeof(struct otx2_cpt_aead_ctx) + CRYPTO_DMA_PADDING,
                .cra_priority = 4001,
                .cra_alignmask = 0,
                .cra_module = THIS_MODULE,
                .cra_driver_name = "cpt_hmac_sha256_cbc_aes",
                .cra_blocksize = AES_BLOCK_SIZE,
                .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK,
-               .cra_ctxsize = sizeof(struct otx2_cpt_aead_ctx),
+               .cra_ctxsize = sizeof(struct otx2_cpt_aead_ctx) + CRYPTO_DMA_PADDING,
                .cra_priority = 4001,
                .cra_alignmask = 0,
                .cra_module = THIS_MODULE,
                .cra_driver_name = "cpt_hmac_sha384_cbc_aes",
                .cra_blocksize = AES_BLOCK_SIZE,
                .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK,
-               .cra_ctxsize = sizeof(struct otx2_cpt_aead_ctx),
+               .cra_ctxsize = sizeof(struct otx2_cpt_aead_ctx) + CRYPTO_DMA_PADDING,
                .cra_priority = 4001,
                .cra_alignmask = 0,
                .cra_module = THIS_MODULE,
                .cra_driver_name = "cpt_hmac_sha512_cbc_aes",
                .cra_blocksize = AES_BLOCK_SIZE,
                .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK,
-               .cra_ctxsize = sizeof(struct otx2_cpt_aead_ctx),
+               .cra_ctxsize = sizeof(struct otx2_cpt_aead_ctx) + CRYPTO_DMA_PADDING,
                .cra_priority = 4001,
                .cra_alignmask = 0,
                .cra_module = THIS_MODULE,
                .cra_driver_name = "cpt_hmac_sha1_ecb_null",
                .cra_blocksize = 1,
                .cra_flags = CRYPTO_ALG_ASYNC,
-               .cra_ctxsize = sizeof(struct otx2_cpt_aead_ctx),
+               .cra_ctxsize = sizeof(struct otx2_cpt_aead_ctx) + CRYPTO_DMA_PADDING,
                .cra_priority = 4001,
                .cra_alignmask = 0,
                .cra_module = THIS_MODULE,
                .cra_driver_name = "cpt_hmac_sha256_ecb_null",
                .cra_blocksize = 1,
                .cra_flags = CRYPTO_ALG_ASYNC,
-               .cra_ctxsize = sizeof(struct otx2_cpt_aead_ctx),
+               .cra_ctxsize = sizeof(struct otx2_cpt_aead_ctx) + CRYPTO_DMA_PADDING,
                .cra_priority = 4001,
                .cra_alignmask = 0,
                .cra_module = THIS_MODULE,
                .cra_driver_name = "cpt_hmac_sha384_ecb_null",
                .cra_blocksize = 1,
                .cra_flags = CRYPTO_ALG_ASYNC,
-               .cra_ctxsize = sizeof(struct otx2_cpt_aead_ctx),
+               .cra_ctxsize = sizeof(struct otx2_cpt_aead_ctx) + CRYPTO_DMA_PADDING,
                .cra_priority = 4001,
                .cra_alignmask = 0,
                .cra_module = THIS_MODULE,
                .cra_driver_name = "cpt_hmac_sha512_ecb_null",
                .cra_blocksize = 1,
                .cra_flags = CRYPTO_ALG_ASYNC,
-               .cra_ctxsize = sizeof(struct otx2_cpt_aead_ctx),
+               .cra_ctxsize = sizeof(struct otx2_cpt_aead_ctx) + CRYPTO_DMA_PADDING,
                .cra_priority = 4001,
                .cra_alignmask = 0,
                .cra_module = THIS_MODULE,
                .cra_driver_name = "cpt_rfc4106_gcm_aes",
                .cra_blocksize = 1,
                .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK,
-               .cra_ctxsize = sizeof(struct otx2_cpt_aead_ctx),
+               .cra_ctxsize = sizeof(struct otx2_cpt_aead_ctx) + CRYPTO_DMA_PADDING,
                .cra_priority = 4001,
                .cra_alignmask = 0,
                .cra_module = THIS_MODULE,