aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/crypto/caam/regs.h
diff options
context:
space:
mode:
authorVakul Garg <vakul.garg@nxp.com>2019-04-09 06:38:08 +0000
committerHerbert Xu <herbert@gondor.apana.org.au>2019-04-18 22:14:58 +0800
commitbbfcac5ff5f26aafa51935a62eb86b6eacfe8a49 (patch)
treef38607a783b0d1fcd81673fe8d3b5ef0312fa9fa /drivers/crypto/caam/regs.h
parentcrypto: ccp - Do not free psp_master when PLATFORM_INIT fails (diff)
downloadwireguard-linux-bbfcac5ff5f26aafa51935a62eb86b6eacfe8a49.tar.xz
wireguard-linux-bbfcac5ff5f26aafa51935a62eb86b6eacfe8a49.zip
crypto: caam/jr - Remove extra memory barrier during job ring dequeue
In function caam_jr_dequeue(), a full memory barrier is used before writing response job ring's register to signal removal of the completed job. Therefore for writing the register, we do not need another write memory barrier. Hence it is removed by replacing the call to wr_reg32() with a newly defined function wr_reg32_relaxed(). Signed-off-by: Vakul Garg <vakul.garg@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/caam/regs.h')
-rw-r--r--drivers/crypto/caam/regs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/crypto/caam/regs.h b/drivers/crypto/caam/regs.h
index 3cd0822ea819..9e912c722e33 100644
--- a/drivers/crypto/caam/regs.h
+++ b/drivers/crypto/caam/regs.h
@@ -96,6 +96,14 @@ 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)