summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/caam/desc_constr.h
diff options
context:
space:
mode:
authorHoria Geantă <horia.geanta@nxp.com>2018-11-08 15:36:30 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2018-11-16 14:11:03 +0800
commitd6bbd4eea243951d2543a0f427c9a6bf2835b6f5 (patch)
treeb22f8cdcee48fda17b2e1d8b6c67b83ded9ba86e /drivers/crypto/caam/desc_constr.h
parent193188e5512db5e84d2d9a7a6a157de651e78f3a (diff)
downloadlinux-stable-d6bbd4eea243951d2543a0f427c9a6bf2835b6f5.tar.gz
linux-stable-d6bbd4eea243951d2543a0f427c9a6bf2835b6f5.tar.bz2
linux-stable-d6bbd4eea243951d2543a0f427c9a6bf2835b6f5.zip
crypto: caam/jr - add support for Chacha20 + Poly1305
Add support for Chacha20 + Poly1305 combined AEAD: -generic (rfc7539) -IPsec (rfc7634 - known as rfc7539esp in the kernel) Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com> Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/caam/desc_constr.h')
-rw-r--r--drivers/crypto/caam/desc_constr.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/crypto/caam/desc_constr.h b/drivers/crypto/caam/desc_constr.h
index d4256fa4a1d6..2980b8ef1fb1 100644
--- a/drivers/crypto/caam/desc_constr.h
+++ b/drivers/crypto/caam/desc_constr.h
@@ -189,6 +189,7 @@ static inline u32 *append_##cmd(u32 * const desc, u32 options) \
}
APPEND_CMD_RET(jump, JUMP)
APPEND_CMD_RET(move, MOVE)
+APPEND_CMD_RET(move_len, MOVE_LEN)
static inline void set_jump_tgt_here(u32 * const desc, u32 *jump_cmd)
{
@@ -327,7 +328,11 @@ static inline void append_##cmd##_imm_##type(u32 * const desc, type immediate, \
u32 options) \
{ \
PRINT_POS; \
- append_cmd(desc, CMD_##op | IMMEDIATE | options | sizeof(type)); \
+ if (options & LDST_LEN_MASK) \
+ append_cmd(desc, CMD_##op | IMMEDIATE | options); \
+ else \
+ append_cmd(desc, CMD_##op | IMMEDIATE | options | \
+ sizeof(type)); \
append_cmd(desc, immediate); \
}
APPEND_CMD_RAW_IMM(load, LOAD, u32);