public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dma-mapping: Remove WARN_ON in dma_free_coherent
@ 2010-03-29 18:09 Stefan Bader
  2010-03-29 20:41 ` Matthew Wilcox
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Bader @ 2010-03-29 18:09 UTC (permalink / raw)
  To: mingo, hpa, mingo, hpa; +Cc: linux-kernel, James.Bottomley, matthew

BugLink: http://bugs.launchpad.net/ubuntu/bugs/458201

Triggered by the following backtrace I was looking at the sym53c8xx_2
driver and in there whether it would be possible to avoid the WARN_ON.

WARNING: at
/build/buildd/linux-2.6.32/arch/x86/include/asm/dma-mapping.h:154
___free_dma_mem_cluster+0x102/0x110()

 [<ffffffff81064f9b>] warn_slowpath_common+0x7b/0xc0
 [<ffffffff81064ff4>] warn_slowpath_null+0x14/0x20
 [<ffffffff8139a2a2>] ___free_dma_mem_cluster+0x102/0x110
 [<ffffffff8139a072>] __sym_mfree+0xd2/0x100
 [<ffffffff8139a109>] __sym_mfree_dma+0x69/0x100
 [<ffffffff8139245f>] sym_hcb_free+0x8f/0x1f0

But it seems modifying that driver would be a bigger effort and maybe
not really worthwile as it is a rather old driver. On the other side
I was told [1] that this WARN_ON applies only to ARM which could sleep
in the free path and it is just bogus for X86. As the code is in
arch/x86 it would never be used for anything else than X86 and if
its truely bogus on X86, couldn't it get removed?

[1] http://kerneltrap.org/mailarchive/linux-scsi/2010/3/25/6886023

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
 arch/x86/include/asm/dma-mapping.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h
index 6a25d5d..2d6097f 100644
--- a/arch/x86/include/asm/dma-mapping.h
+++ b/arch/x86/include/asm/dma-mapping.h
@@ -151,8 +151,6 @@ static inline void dma_free_coherent(struct device *dev, size_t size,
 {
 	struct dma_map_ops *ops = get_dma_ops(dev);
 
-	WARN_ON(irqs_disabled());       /* for portability */
-
 	if (dma_release_from_coherent(dev, get_order(size), vaddr))
 		return;
 
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-03-29 20:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-29 18:09 [PATCH] dma-mapping: Remove WARN_ON in dma_free_coherent Stefan Bader
2010-03-29 20:41 ` Matthew Wilcox
2010-03-29 20:50   ` Stefan Bader
2010-03-29 20:56     ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox