提交 c23116e4 编写于 作者: V Vakul Garg 提交者: Herbert Xu

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: NVakul Garg <vakul.garg@nxp.com>
Reviewed-by: NHoria Geanta <horia.geanta@nxp.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 1b30b989
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册