From: Varun Sethi <v.se...@nxp.com>

Adding a Jump instruction with CALM flag to ensure
previous processing has been completed.

Fixes: 8827d94398f1 ("crypto/dpaa2_sec/hw: support AES-AES 18-bit PDCP")
Cc: vakul.g...@nxp.com
Cc: sta...@dpdk.org

Signed-off-by: Gagandeep Singh <g.si...@nxp.com>
Signed-off-by: Varun Sethi <v.se...@nxp.com>
Acked-by: Hemant Agrawal <hemant.agra...@nxp.com>
---
 drivers/common/dpaax/caamflib/desc/pdcp.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h 
b/drivers/common/dpaax/caamflib/desc/pdcp.h
index bc35114cf4..9ada3905c5 100644
--- a/drivers/common/dpaax/caamflib/desc/pdcp.h
+++ b/drivers/common/dpaax/caamflib/desc/pdcp.h
@@ -1220,6 +1220,11 @@ pdcp_insert_cplane_snow_aes_op(struct program *p,
                SEQFIFOLOAD(p, MSG1, 0, VLF | LAST1 | FLUSH1);
                MOVEB(p, CONTEXT1, 0, MATH3, 0, 4, WAITCOMP | IMMED);
 
+               /* conditional jump with calm added to ensure that the
+                * previous processing has been completed
+                */
+               JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
+
                LOAD(p, CLRW_RESET_CLS1_CHA |
                     CLRW_CLR_C1KEY |
                     CLRW_CLR_C1CTX |
@@ -1921,6 +1926,11 @@ pdcp_insert_cplane_zuc_aes_op(struct program *p,
 
                MOVEB(p, OFIFO, 0, MATH3, 0, 4, IMMED);
 
+               /* conditional jump with calm added to ensure that the
+                * previous processing has been completed
+                */
+               JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM);
+
                LOAD(p, CLRW_RESET_CLS1_CHA |
                     CLRW_CLR_C1KEY |
                     CLRW_CLR_C1CTX |
-- 
2.25.1

Reply via email to