From patchwork Mon Apr 12 12:53:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Bader X-Patchwork-Id: 49966 X-Patchwork-Delegate: apw@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 44F82B7D22 for ; Mon, 12 Apr 2010 22:54:25 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1O1J9K-0002Du-A4; Mon, 12 Apr 2010 13:53:58 +0100 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1O1J9J-0002Dp-0q for kernel-team@lists.ubuntu.com; Mon, 12 Apr 2010 13:53:57 +0100 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1O1J9I-0005W1-SR for ; Mon, 12 Apr 2010 13:53:56 +0100 Received: from p5b2e75e2.dip.t-dialin.net ([91.46.117.226] helo=canonical.com) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1O1J9I-0006Zl-Mf for kernel-team@lists.ubuntu.com; Mon, 12 Apr 2010 13:53:56 +0100 From: Stefan Bader To: kernel-team@lists.ubuntu.com Subject: [Lucid] SRU: dma-mapping: Remove WARN_ON in dma_free_coherent Date: Mon, 12 Apr 2010 14:53:55 +0200 Message-Id: <1271076835-3182-1-git-send-email-stefan.bader@canonical.com> X-Mailer: git-send-email 1.6.3.3 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com This is really just hiding the warning about incompatible driver code (for other archs). But its part of what is done for hot- plugging in KVM (supposedly cloud) and its in the x86 only code only, so it might be a way to prevent scared reports about nothing. Stefan From 72e6b51aa333435b9492011a4842ab0c462503de Mon Sep 17 00:00:00 2001 From: Stefan Bader Date: Mon, 29 Mar 2010 19:12:36 +0200 Subject: [PATCH] dma-mapping: Remove WARN_ON in dma_free_coherent BugLink: http://bugs.launchpad.net/ubuntu/bugs/458201 Triggered by the following backtrace: WARNING: at /build/buildd/linux-2.6.32/arch/x86/include/asm/dma-mapping.h:154 ___free_dma_mem_cluster+0x102/0x110() [] warn_slowpath_common+0x7b/0xc0 [] warn_slowpath_null+0x14/0x20 [] ___free_dma_mem_cluster+0x102/0x110 [] __sym_mfree+0xd2/0x100 [] __sym_mfree_dma+0x69/0x100 [] sym_hcb_free+0x8f/0x1f0 This patch never will be accepted upstream because the WARN_ON is supposed to perevent driver development which is only compatible with x86 on x86 (ARM can sleep in that function). The right way to fix it would be to make the offending function use locks in the right way but that requires careful implementation. Signed-off-by: Stefan Bader Acked-by: Andy Whitcroft --- 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;