aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVakul Garg <[email protected]>2019-03-22 02:00:37 +0000
committerHerbert Xu <[email protected]>2019-03-28 13:55:34 +0800
commitc23116e48a9b8ffe2fa520add3ba5ba52049327a (patch)
treeab8b7f5128ca52c97e164e5cdea66425035bee4d
parent1b30b989cbea4052302bc304cc6179ee2f33ea9b (diff)
crypto: caam/jr - Remove extra memory barrier during job ring enqueue
In caam_jr_enqueue(), a write barrier is needed to order stores to job ring slot before declaring addition of new job into input job ring. The register write is done using wr_reg32() which internally uses iowrite32() for write operation. The api iowrite32() issues a write barrier before issuing write operation. Therefore, the wmb() preceding wr_reg32() can be safely removed. Signed-off-by: Vakul Garg <[email protected]> Reviewed-by: Horia Geanta <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
-rw-r--r--drivers/crypto/caam/jr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c
index e95f82778fa1..1de2562d0982 100644
--- a/drivers/crypto/caam/jr.c
+++ b/drivers/crypto/caam/jr.c
@@ -371,9 +371,11 @@ int caam_jr_enqueue(struct device *dev, u32 *desc,
/*
* Ensure that all job information has been written before
- * notifying CAAM that a new job was added to the input ring.
+ * notifying CAAM that a new job was added to the input ring
+ * using a memory barrier. The wr_reg32() uses api iowrite32()
+ * to do the register write. iowrite32() issues a memory barrier
+ * before the write operation.
*/
- wmb();
wr_reg32(&jrp->rregs->inpring_jobadd, 1);