All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilad Ben-Yossef <gilad@benyossef.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-crypto@vger.kernel.org, devel@driverdev.osuosl.org,
	driverdev-devel@linuxdriverproject.org,
	linux-kernel@vger.kernel.org, Ofir Drang <ofir.drang@arm.com>
Subject: [PATCH 04/26] staging: ccree: remove GFP_DMA flag from mem allocs
Date: Mon,  1 Jan 2018 12:06:31 +0000	[thread overview]
Message-ID: <1514808421-21993-5-git-send-email-gilad@benyossef.com> (raw)
In-Reply-To: <1514808421-21993-1-git-send-email-gilad@benyossef.com>

Remove bogus GFP_DMA flag from memory allocations. ccree driver
does not operate over an ISA or similar limited bus.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
---
 drivers/staging/ccree/ssi_cipher.c |  2 +-
 drivers/staging/ccree/ssi_hash.c   | 15 ++++++---------
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/ccree/ssi_cipher.c b/drivers/staging/ccree/ssi_cipher.c
index 00140b4..4adf1f6 100644
--- a/drivers/staging/ccree/ssi_cipher.c
+++ b/drivers/staging/ccree/ssi_cipher.c
@@ -166,7 +166,7 @@ static int cc_cipher_init(struct crypto_tfm *tfm)
 	ctx_p->drvdata = cc_alg->drvdata;
 
 	/* Allocate key buffer, cache line aligned */
-	ctx_p->user.key = kmalloc(max_key_buf_size, GFP_KERNEL | GFP_DMA);
+	ctx_p->user.key = kmalloc(max_key_buf_size, GFP_KERNEL);
 	if (!ctx_p->user.key)
 		return -ENOMEM;
 
diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c
index 1ed794f..085a69a 100644
--- a/drivers/staging/ccree/ssi_hash.c
+++ b/drivers/staging/ccree/ssi_hash.c
@@ -132,29 +132,27 @@ static int cc_map_req(struct device *dev, struct ahash_req_ctx *state,
 	struct cc_hw_desc desc;
 	int rc = -ENOMEM;
 
-	state->buff0 = kzalloc(CC_MAX_HASH_BLCK_SIZE, GFP_KERNEL | GFP_DMA);
+	state->buff0 = kzalloc(CC_MAX_HASH_BLCK_SIZE, GFP_KERNEL);
 	if (!state->buff0)
 		goto fail0;
 
-	state->buff1 = kzalloc(CC_MAX_HASH_BLCK_SIZE, GFP_KERNEL | GFP_DMA);
+	state->buff1 = kzalloc(CC_MAX_HASH_BLCK_SIZE, GFP_KERNEL);
 	if (!state->buff1)
 		goto fail_buff0;
 
 	state->digest_result_buff = kzalloc(CC_MAX_HASH_DIGEST_SIZE,
-					    GFP_KERNEL | GFP_DMA);
+					    GFP_KERNEL);
 	if (!state->digest_result_buff)
 		goto fail_buff1;
 
-	state->digest_buff = kzalloc(ctx->inter_digestsize,
-				     GFP_KERNEL | GFP_DMA);
+	state->digest_buff = kzalloc(ctx->inter_digestsize, GFP_KERNEL);
 	if (!state->digest_buff)
 		goto fail_digest_result_buff;
 
 	dev_dbg(dev, "Allocated digest-buffer in context ctx->digest_buff=@%p\n",
 		state->digest_buff);
 	if (ctx->hw_mode != DRV_CIPHER_XCBC_MAC) {
-		state->digest_bytes_len = kzalloc(HASH_LEN_SIZE,
-						  GFP_KERNEL | GFP_DMA);
+		state->digest_bytes_len = kzalloc(HASH_LEN_SIZE, GFP_KERNEL);
 		if (!state->digest_bytes_len)
 			goto fail1;
 
@@ -164,8 +162,7 @@ static int cc_map_req(struct device *dev, struct ahash_req_ctx *state,
 		state->digest_bytes_len = NULL;
 	}
 
-	state->opad_digest_buff = kzalloc(ctx->inter_digestsize,
-					  GFP_KERNEL | GFP_DMA);
+	state->opad_digest_buff = kzalloc(ctx->inter_digestsize, GFP_KERNEL);
 	if (!state->opad_digest_buff)
 		goto fail2;
 
-- 
2.7.4

WARNING: multiple messages have this Message-ID (diff)
From: Gilad Ben-Yossef <gilad@benyossef.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ofir Drang <ofir.drang@arm.com>,
	linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
	driverdev-devel@linuxdriverproject.org,
	devel@driverdev.osuosl.org
Subject: [PATCH 04/26] staging: ccree: remove GFP_DMA flag from mem allocs
Date: Mon,  1 Jan 2018 12:06:31 +0000	[thread overview]
Message-ID: <1514808421-21993-5-git-send-email-gilad@benyossef.com> (raw)
In-Reply-To: <1514808421-21993-1-git-send-email-gilad@benyossef.com>

Remove bogus GFP_DMA flag from memory allocations. ccree driver
does not operate over an ISA or similar limited bus.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
---
 drivers/staging/ccree/ssi_cipher.c |  2 +-
 drivers/staging/ccree/ssi_hash.c   | 15 ++++++---------
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/ccree/ssi_cipher.c b/drivers/staging/ccree/ssi_cipher.c
index 00140b4..4adf1f6 100644
--- a/drivers/staging/ccree/ssi_cipher.c
+++ b/drivers/staging/ccree/ssi_cipher.c
@@ -166,7 +166,7 @@ static int cc_cipher_init(struct crypto_tfm *tfm)
 	ctx_p->drvdata = cc_alg->drvdata;
 
 	/* Allocate key buffer, cache line aligned */
-	ctx_p->user.key = kmalloc(max_key_buf_size, GFP_KERNEL | GFP_DMA);
+	ctx_p->user.key = kmalloc(max_key_buf_size, GFP_KERNEL);
 	if (!ctx_p->user.key)
 		return -ENOMEM;
 
diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c
index 1ed794f..085a69a 100644
--- a/drivers/staging/ccree/ssi_hash.c
+++ b/drivers/staging/ccree/ssi_hash.c
@@ -132,29 +132,27 @@ static int cc_map_req(struct device *dev, struct ahash_req_ctx *state,
 	struct cc_hw_desc desc;
 	int rc = -ENOMEM;
 
-	state->buff0 = kzalloc(CC_MAX_HASH_BLCK_SIZE, GFP_KERNEL | GFP_DMA);
+	state->buff0 = kzalloc(CC_MAX_HASH_BLCK_SIZE, GFP_KERNEL);
 	if (!state->buff0)
 		goto fail0;
 
-	state->buff1 = kzalloc(CC_MAX_HASH_BLCK_SIZE, GFP_KERNEL | GFP_DMA);
+	state->buff1 = kzalloc(CC_MAX_HASH_BLCK_SIZE, GFP_KERNEL);
 	if (!state->buff1)
 		goto fail_buff0;
 
 	state->digest_result_buff = kzalloc(CC_MAX_HASH_DIGEST_SIZE,
-					    GFP_KERNEL | GFP_DMA);
+					    GFP_KERNEL);
 	if (!state->digest_result_buff)
 		goto fail_buff1;
 
-	state->digest_buff = kzalloc(ctx->inter_digestsize,
-				     GFP_KERNEL | GFP_DMA);
+	state->digest_buff = kzalloc(ctx->inter_digestsize, GFP_KERNEL);
 	if (!state->digest_buff)
 		goto fail_digest_result_buff;
 
 	dev_dbg(dev, "Allocated digest-buffer in context ctx->digest_buff=@%p\n",
 		state->digest_buff);
 	if (ctx->hw_mode != DRV_CIPHER_XCBC_MAC) {
-		state->digest_bytes_len = kzalloc(HASH_LEN_SIZE,
-						  GFP_KERNEL | GFP_DMA);
+		state->digest_bytes_len = kzalloc(HASH_LEN_SIZE, GFP_KERNEL);
 		if (!state->digest_bytes_len)
 			goto fail1;
 
@@ -164,8 +162,7 @@ static int cc_map_req(struct device *dev, struct ahash_req_ctx *state,
 		state->digest_bytes_len = NULL;
 	}
 
-	state->opad_digest_buff = kzalloc(ctx->inter_digestsize,
-					  GFP_KERNEL | GFP_DMA);
+	state->opad_digest_buff = kzalloc(ctx->inter_digestsize, GFP_KERNEL);
 	if (!state->opad_digest_buff)
 		goto fail2;
 
-- 
2.7.4

WARNING: multiple messages have this Message-ID (diff)
From: Gilad Ben-Yossef <gilad@benyossef.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-crypto@vger.kernel.org, devel@driverdev.osuosl.org,
	driverdev-devel@linuxdriverproject.org,
	linux-kernel@vger.kernel.org, Ofir Drang <ofir.drang@arm.com>
Subject: [PATCH 04/26] staging: ccree: remove GFP_DMA flag from mem allocs
Date: Mon,  1 Jan 2018 12:06:31 +0000	[thread overview]
Message-ID: <1514808421-21993-5-git-send-email-gilad@benyossef.com> (raw)
In-Reply-To: <1514808421-21993-1-git-send-email-gilad@benyossef.com>

Remove bogus GFP_DMA flag from memory allocations. ccree driver
does not operate over an ISA or similar limited bus.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
---
 drivers/staging/ccree/ssi_cipher.c |  2 +-
 drivers/staging/ccree/ssi_hash.c   | 15 ++++++---------
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/ccree/ssi_cipher.c b/drivers/staging/ccree/ssi_cipher.c
index 00140b4..4adf1f6 100644
--- a/drivers/staging/ccree/ssi_cipher.c
+++ b/drivers/staging/ccree/ssi_cipher.c
@@ -166,7 +166,7 @@ static int cc_cipher_init(struct crypto_tfm *tfm)
 	ctx_p->drvdata = cc_alg->drvdata;
 
 	/* Allocate key buffer, cache line aligned */
-	ctx_p->user.key = kmalloc(max_key_buf_size, GFP_KERNEL | GFP_DMA);
+	ctx_p->user.key = kmalloc(max_key_buf_size, GFP_KERNEL);
 	if (!ctx_p->user.key)
 		return -ENOMEM;
 
diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c
index 1ed794f..085a69a 100644
--- a/drivers/staging/ccree/ssi_hash.c
+++ b/drivers/staging/ccree/ssi_hash.c
@@ -132,29 +132,27 @@ static int cc_map_req(struct device *dev, struct ahash_req_ctx *state,
 	struct cc_hw_desc desc;
 	int rc = -ENOMEM;
 
-	state->buff0 = kzalloc(CC_MAX_HASH_BLCK_SIZE, GFP_KERNEL | GFP_DMA);
+	state->buff0 = kzalloc(CC_MAX_HASH_BLCK_SIZE, GFP_KERNEL);
 	if (!state->buff0)
 		goto fail0;
 
-	state->buff1 = kzalloc(CC_MAX_HASH_BLCK_SIZE, GFP_KERNEL | GFP_DMA);
+	state->buff1 = kzalloc(CC_MAX_HASH_BLCK_SIZE, GFP_KERNEL);
 	if (!state->buff1)
 		goto fail_buff0;
 
 	state->digest_result_buff = kzalloc(CC_MAX_HASH_DIGEST_SIZE,
-					    GFP_KERNEL | GFP_DMA);
+					    GFP_KERNEL);
 	if (!state->digest_result_buff)
 		goto fail_buff1;
 
-	state->digest_buff = kzalloc(ctx->inter_digestsize,
-				     GFP_KERNEL | GFP_DMA);
+	state->digest_buff = kzalloc(ctx->inter_digestsize, GFP_KERNEL);
 	if (!state->digest_buff)
 		goto fail_digest_result_buff;
 
 	dev_dbg(dev, "Allocated digest-buffer in context ctx->digest_buff=@%p\n",
 		state->digest_buff);
 	if (ctx->hw_mode != DRV_CIPHER_XCBC_MAC) {
-		state->digest_bytes_len = kzalloc(HASH_LEN_SIZE,
-						  GFP_KERNEL | GFP_DMA);
+		state->digest_bytes_len = kzalloc(HASH_LEN_SIZE, GFP_KERNEL);
 		if (!state->digest_bytes_len)
 			goto fail1;
 
@@ -164,8 +162,7 @@ static int cc_map_req(struct device *dev, struct ahash_req_ctx *state,
 		state->digest_bytes_len = NULL;
 	}
 
-	state->opad_digest_buff = kzalloc(ctx->inter_digestsize,
-					  GFP_KERNEL | GFP_DMA);
+	state->opad_digest_buff = kzalloc(ctx->inter_digestsize, GFP_KERNEL);
 	if (!state->opad_digest_buff)
 		goto fail2;
 
-- 
2.7.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  parent reply	other threads:[~2018-01-01 12:06 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-01 12:06 [PATCH 00/26] staging: ccree: fixes and cleanups Gilad Ben-Yossef
2018-01-01 12:06 ` Gilad Ben-Yossef
2018-01-01 12:06 ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 01/26] staging: ccree: SPDXify driver Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 13:53   ` Philippe Ombredanne
2018-01-01 13:53     ` Philippe Ombredanne
2018-01-01 14:11     ` Gilad Ben-Yossef
2018-01-01 14:11       ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 02/26] staging: ccree: fold hash defs into queue defs Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 03/26] staging: ccree: fold reg common defines into driver Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06 ` Gilad Ben-Yossef [this message]
2018-01-01 12:06   ` [PATCH 04/26] staging: ccree: remove GFP_DMA flag from mem allocs Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 05/26] staging: ccree: pick alloc mem flags based on req flags Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 06/26] staging: ccree: copy larval digest from RAM Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 07/26] staging: ccree: tag debugfs init/exit func properly Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 08/26] staging: ccree: remove unused leftover field Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 09/26] staging: ccree: breakup send_request Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 10/26] staging: ccree: add backlog processing Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 11/26] stating: ccree: revert "staging: ccree: fix leak of import() after init()" Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 12/26] staging: ccree: failing the suspend is not an error Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 13/26] staging: ccree: check DMA pool buf !NULL before free Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 14/26] staging: ccree: handle end of sg list gracefully Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 15/26] staging: ccree: use Makefile to include PM code Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 16/26] staging: ccree: remove unused field Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 17/26] staging: ccree: use array for double buffer Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 18/26] staging: ccree: allocate hash bufs inside req ctx Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 19/26] staging: ccree: do not map bufs in ahash_init Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 20/26] staging: ccree: fix indentation of func params Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 21/26] staging: ccree: fold common code into service func Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 22/26] staging: ccree: put pointer next to var name Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 23/26] stating: ccree: fix allocation of void sized buf Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 24/26] staging: ccree: use a consistent file naming convention Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 25/26] staging: ccree: remove unneeded includes Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef
2018-01-01 12:06 ` [PATCH 26/26] staging: ccree: update TODO Gilad Ben-Yossef
2018-01-01 12:06   ` Gilad Ben-Yossef

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1514808421-21993-5-git-send-email-gilad@benyossef.com \
    --to=gilad@benyossef.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ofir.drang@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.