Revert "crypto: caam/jr - Remove extra memory barrier during job ring dequeue"
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 9 May 2019 05:20:48 +0000 (13:20 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 9 May 2019 05:20:48 +0000 (13:20 +0800)
This reverts commit bbfcac5ff5f26aafa51935a62eb86b6eacfe8a49.

It caused a crash regression on powerpc:

https://lore.kernel.org/linux-crypto/87pnp2aflz.fsf@concordia.ellerman.id.au/

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/jr.c
drivers/crypto/caam/regs.h

index 044a69b526f7ba402dde4901518dbf85f6f416d6..1de2562d09824960582472d1a333e15842bc82e0 100644 (file)
@@ -213,7 +213,7 @@ static void caam_jr_dequeue(unsigned long devarg)
                mb();
 
                /* set done */
-               wr_reg32_relaxed(&jrp->rregs->outring_rmvd, 1);
+               wr_reg32(&jrp->rregs->outring_rmvd, 1);
 
                jrp->out_ring_read_index = (jrp->out_ring_read_index + 1) &
                                           (JOBR_DEPTH - 1);
index c1fa1ec701d9700263da3c25fa11b1e5c942bf7d..8591914d5c51b73de69f9832c4bf272eeaff4efc 100644 (file)
@@ -96,14 +96,6 @@ cpu_to_caam(16)
 cpu_to_caam(32)
 cpu_to_caam(64)
 
-static inline void wr_reg32_relaxed(void __iomem *reg, u32 data)
-{
-       if (caam_little_end)
-               writel_relaxed(data, reg);
-       else
-               writel_relaxed(cpu_to_be32(data), reg);
-}
-
 static inline void wr_reg32(void __iomem *reg, u32 data)
 {
        if (caam_little_end)