Skip to content

Commit f0ac02c

Browse files
ndreysherbertx
authored andcommitted
crypto: caam - allocate RNG instantiation descriptor with GFP_DMA
Be consistent with the rest of the codebase and use GFP_DMA when allocating memory for a CAAM JR descriptor. Signed-off-by: Andrey Smirnov <[email protected]> Reviewed-by: Horia Geantă <[email protected]> Cc: Chris Healy <[email protected]> Cc: Lucas Stach <[email protected]> Cc: Horia Geantă <[email protected]> Cc: Herbert Xu <[email protected]> Cc: Iuliana Prodan <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Herbert Xu <[email protected]>
1 parent 4ccff76 commit f0ac02c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/crypto/caam/ctrl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ static int deinstantiate_rng(struct device *ctrldev, int state_handle_mask)
196196
u32 *desc, status;
197197
int sh_idx, ret = 0;
198198

199-
desc = kmalloc(CAAM_CMD_SZ * 3, GFP_KERNEL);
199+
desc = kmalloc(CAAM_CMD_SZ * 3, GFP_KERNEL | GFP_DMA);
200200
if (!desc)
201201
return -ENOMEM;
202202

@@ -273,7 +273,7 @@ static int instantiate_rng(struct device *ctrldev, int state_handle_mask,
273273
int ret = 0, sh_idx;
274274

275275
ctrl = (struct caam_ctrl __iomem *)ctrlpriv->ctrl;
276-
desc = kmalloc(CAAM_CMD_SZ * 7, GFP_KERNEL);
276+
desc = kmalloc(CAAM_CMD_SZ * 7, GFP_KERNEL | GFP_DMA);
277277
if (!desc)
278278
return -ENOMEM;
279279

0 commit comments

Comments
 (0)