[PATCH 2/2] crypto/nx: Do not initialize workmem allocation

Haren Myneni haren at linux.vnet.ibm.com
Mon Sep 25 16:44:13 AEST 2017


[PATCH 2/2] crypto/nx: Do not initialize workmem allocation

We are using percpu send window on P9 NX (powerNV) instead of opening /
closing per each crypto session. Means txwin is removed from workmem.
So we do not need to initialize workmem for each request.

Signed-off-by: Haren Myneni <haren at us.ibm.com>
---
 drivers/crypto/nx/nx-842.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/nx/nx-842.c b/drivers/crypto/nx/nx-842.c
index da3cb8c..d94e25d 100644
--- a/drivers/crypto/nx/nx-842.c
+++ b/drivers/crypto/nx/nx-842.c
@@ -116,7 +116,7 @@ int nx842_crypto_init(struct crypto_tfm *tfm, struct nx842_driver *driver)
 
 	spin_lock_init(&ctx->lock);
 	ctx->driver = driver;
-	ctx->wmem = kzalloc(driver->workmem_size, GFP_KERNEL);
+	ctx->wmem = kmalloc(driver->workmem_size, GFP_KERNEL);
 	ctx->sbounce = (u8 *)__get_free_pages(GFP_KERNEL, BOUNCE_BUFFER_ORDER);
 	ctx->dbounce = (u8 *)__get_free_pages(GFP_KERNEL, BOUNCE_BUFFER_ORDER);
 	if (!ctx->wmem || !ctx->sbounce || !ctx->dbounce) {
-- 
1.8.3.1





More information about the Linuxppc-dev mailing list