diff mbox

dma: tegra: fix interrupt name issue with apb dma.

Message ID 1349284913-22350-1-git-send-email-ldewangan@nvidia.com
State Not Applicable, archived
Headers show

Commit Message

Laxman Dewangan Oct. 3, 2012, 5:21 p.m. UTC
When watching the interrupts through /proc/interrupts,
the name of the interrupts are blank or garbage. The
reason is the pointer passed for devname during irq
registration is stack and so it get changed after
dma registration completes.
Allocate the pointer as part of dma channel and pass
this pointer as the devname for irq registration to
avoid change of name.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
Resending as mail was not delivered to arm@kernel.org.

 drivers/dma/tegra20-apb-dma.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Comments

Stephen Warren Oct. 3, 2012, 8:53 p.m. UTC | #1
On 10/03/2012 11:21 AM, Laxman Dewangan wrote:
> When watching the interrupts through /proc/interrupts,
> the name of the interrupts are blank or garbage. The
> reason is the pointer passed for devname during irq
> registration is stack and so it get changed after
> dma registration completes.
> Allocate the pointer as part of dma channel and pass
> this pointer as the devname for irq registration to
> avoid change of name.

(Dropping stable Cc; Olof/Arnd or Vinod, is it possible you could add
that into the patch description when applying this?)

Reported-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Arnd Bergmann Oct. 4, 2012, 8:16 a.m. UTC | #2
On Wednesday 03 October 2012, Stephen Warren wrote:
> On 10/03/2012 11:21 AM, Laxman Dewangan wrote:
> > When watching the interrupts through /proc/interrupts,
> > the name of the interrupts are blank or garbage. The
> > reason is the pointer passed for devname during irq
> > registration is stack and so it get changed after
> > dma registration completes.
> > Allocate the pointer as part of dma channel and pass
> > this pointer as the devname for irq registration to
> > avoid change of name.
> 
> (Dropping stable Cc; Olof/Arnd or Vinod, is it possible you could add
> that into the patch description when applying this?)
> 
> Reported-by: Stephen Warren <swarren@nvidia.com>
> Acked-by: Stephen Warren <swarren@nvidia.com>

Should be no problem. If Vinod wants to pick it up:

Acked-by: Arnd Bergmann <arnd@arndb.de>

Note that you can configure git send-email to automatically drop
Cc's to stable@vger.kernel.org, and that the correct address
is the one with vger in it, not just stable@kernel.org.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Vinod Koul Oct. 4, 2012, 8:26 a.m. UTC | #3
> >
> > (Dropping stable Cc; Olof/Arnd or Vinod, is it possible you could add
> > that into the patch description when applying this?)
> >
> > Reported-by: Stephen Warren <swarren@nvidia.com>
> > Acked-by: Stephen Warren <swarren@nvidia.com>
> 
> Should be no problem. If Vinod wants to pick it up:
> 
> Acked-by: Arnd Bergmann <arnd@arndb.de>
Will do it later today... am travelling so slow on email :(

--
~Vinod
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Vinod Koul Oct. 4, 2012, 3:23 p.m. UTC | #4
On Thu, 2012-10-04 at 08:26 +0000, Koul, Vinod wrote:
> > >
> > > (Dropping stable Cc; Olof/Arnd or Vinod, is it possible you could add
> > > that into the patch description when applying this?)
> > >
> > > Reported-by: Stephen Warren <swarren@nvidia.com>
> > > Acked-by: Stephen Warren <swarren@nvidia.com>
> > 
> > Should be no problem. If Vinod wants to pick it up:
> > 
> > Acked-by: Arnd Bergmann <arnd@arndb.de>
> Will do it later today... am travelling so slow on email :(
Done, applied ith Stephen's credits :) Thanks
diff mbox

Patch

diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index 24a6512..528c62d 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -169,6 +169,7 @@  typedef void (*dma_isr_handler)(struct tegra_dma_channel *tdc,
 /* tegra_dma_channel: Channel specific information */
 struct tegra_dma_channel {
 	struct dma_chan		dma_chan;
+	char			name[30];
 	bool			config_init;
 	int			id;
 	int			irq;
@@ -1282,7 +1283,6 @@  static int __devinit tegra_dma_probe(struct platform_device *pdev)
 	INIT_LIST_HEAD(&tdma->dma_dev.channels);
 	for (i = 0; i < cdata->nr_channels; i++) {
 		struct tegra_dma_channel *tdc = &tdma->channels[i];
-		char irq_name[30];
 
 		tdc->chan_base_offset = TEGRA_APBDMA_CHANNEL_BASE_ADD_OFFSET +
 					i * TEGRA_APBDMA_CHANNEL_REGISTER_SIZE;
@@ -1294,9 +1294,9 @@  static int __devinit tegra_dma_probe(struct platform_device *pdev)
 			goto err_irq;
 		}
 		tdc->irq = res->start;
-		snprintf(irq_name, sizeof(irq_name), "apbdma.%d", i);
+		snprintf(tdc->name, sizeof(tdc->name), "apbdma.%d", i);
 		ret = devm_request_irq(&pdev->dev, tdc->irq,
-				tegra_dma_isr, 0, irq_name, tdc);
+				tegra_dma_isr, 0, tdc->name, tdc);
 		if (ret) {
 			dev_err(&pdev->dev,
 				"request_irq failed with err %d channel %d\n",