Skip to content

Commit a235299

Browse files
Nikolaus Vossherbertx
authored andcommitted
crypto: caam - fix CAAM io mem access in blob_gen
IO memory access has to be done with accessors defined in caam/regs.h as there are little-endian architectures with a big-endian CAAM unit. Fixes: 6a83830 ("crypto: caam - warn if blob_gen key is insecure") Signed-off-by: Nikolaus Voss <[email protected]> Reviewed-by: Ahmad Fatoum <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 1b929c0 commit a235299

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/crypto/caam/blob_gen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ int caam_process_blob(struct caam_blob_priv *priv,
104104
}
105105

106106
ctrlpriv = dev_get_drvdata(jrdev->parent);
107-
moo = FIELD_GET(CSTA_MOO, ioread32(&ctrlpriv->ctrl->perfmon.status));
107+
moo = FIELD_GET(CSTA_MOO, rd_reg32(&ctrlpriv->ctrl->perfmon.status));
108108
if (moo != CSTA_MOO_SECURE && moo != CSTA_MOO_TRUSTED)
109109
dev_warn(jrdev,
110110
"using insecure test key, enable HAB to use unique device key!\n");

0 commit comments

Comments
 (0)