public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Laxman Dewangan <ldewangan@nvidia.com>,
	Vinod Koul <vinod.koul@intel.com>,
	Stephen Warren <swarren@wwwdotorg.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Alexandre Courbot <gnurou@gmail.com>
Cc: <dmaengine@vger.kernel.org>, <linux-tegra@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <andy.shevchenko@gmail.com>,
	Jon Hunter <jonathanh@nvidia.com>
Subject: [PATCH V3 5/6] dmaengine: tegra-apb: Update driver to use GFP_NOWAIT
Date: Fri, 13 Nov 2015 16:39:42 +0000	[thread overview]
Message-ID: <1447432783-7466-6-git-send-email-jonathanh@nvidia.com> (raw)
In-Reply-To: <1447432783-7466-1-git-send-email-jonathanh@nvidia.com>

The tegra20-apb-dma driver currently uses the flag GFP_ATOMIC when
allocating memory for structures used in conjunction with the DMA
descriptors. It is preferred that dmaengine drivers use GFP_NOWAIT
instead and so the emergency memory pool will not be used by these
drivers.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
 drivers/dma/tegra20-apb-dma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index d4cabd6931e5..754c1f54d4fe 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -296,7 +296,7 @@ static struct tegra_dma_desc *tegra_dma_desc_get(
 	spin_unlock_irqrestore(&tdc->lock, flags);
 
 	/* Allocate DMA desc */
-	dma_desc = kzalloc(sizeof(*dma_desc), GFP_ATOMIC);
+	dma_desc = kzalloc(sizeof(*dma_desc), GFP_NOWAIT);
 	if (!dma_desc) {
 		dev_err(tdc2dev(tdc), "dma_desc alloc failed\n");
 		return NULL;
@@ -336,7 +336,7 @@ static struct tegra_dma_sg_req *tegra_dma_sg_req_get(
 	}
 	spin_unlock_irqrestore(&tdc->lock, flags);
 
-	sg_req = kzalloc(sizeof(struct tegra_dma_sg_req), GFP_ATOMIC);
+	sg_req = kzalloc(sizeof(struct tegra_dma_sg_req), GFP_NOWAIT);
 	if (!sg_req)
 		dev_err(tdc2dev(tdc), "sg_req alloc failed\n");
 	return sg_req;
-- 
2.1.4


  parent reply	other threads:[~2015-11-13 16:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-13 16:39 [PATCH V3 0/6] DMA: tegra-apb: Clean-up Jon Hunter
2015-11-13 16:39 ` [PATCH V3 1/6] dmaengine: tegra-apb: Correct runtime-pm usage Jon Hunter
2015-11-14 13:27   ` Andy Shevchenko
2015-11-16  9:34     ` Jon Hunter
2015-11-13 16:39 ` [PATCH V3 2/6] dmaengine: tegra-apb: Use dev_get_drvdata() Jon Hunter
2015-11-13 16:39 ` [PATCH V3 3/6] dmaengine: tegra-apb: Save and restore word count Jon Hunter
2015-11-13 16:39 ` [PATCH V3 4/6] dmaengine: tegra-apb: Only save channel state for those in use Jon Hunter
2015-11-13 16:39 ` Jon Hunter [this message]
2015-11-13 16:39 ` [PATCH V3 6/6] dmaengine: tegra-apb: Free interrupts before killing tasklets Jon Hunter
2015-11-30 16:45 ` [PATCH V3 0/6] DMA: tegra-apb: Clean-up Jon Hunter
2015-12-05 10:43 ` Vinod Koul

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=1447432783-7466-6-git-send-email-jonathanh@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=gnurou@gmail.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=swarren@wwwdotorg.org \
    --cc=thierry.reding@gmail.com \
    --cc=vinod.koul@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox