OSDN Git Service

crypto/nx: Do not initialize workmem allocation
authorHaren Myneni <haren@linux.vnet.ibm.com>
Mon, 25 Sep 2017 06:44:13 +0000 (23:44 -0700)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 11 Nov 2017 22:03:11 +0000 (09:03 +1100)
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@us.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/crypto/nx/nx-842.c

index da3cb8c..d94e25d 100644 (file)
@@ -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) {