From patchwork Fri Nov 23 21:36:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 201417 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 7E1322C05A5 for ; Sat, 24 Nov 2012 08:46:51 +1100 (EST) Received: from g1t0029.austin.hp.com (g1t0029.austin.hp.com [15.216.28.36]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "smtp.hp.com", Issuer "VeriSign Class 3 Secure Server CA - G3" (not verified)) by ozlabs.org (Postfix) with ESMTPS id CCFDE2C0327 for ; Sat, 24 Nov 2012 08:46:27 +1100 (EST) Received: from g1t0038.austin.hp.com (g1t0038.austin.hp.com [16.236.32.44]) by g1t0029.austin.hp.com (Postfix) with ESMTP id 9623C3814F; Fri, 23 Nov 2012 21:36:38 +0000 (UTC) Received: from [10.152.0.6] (swa01cs005-da01.atlanta.hp.com [16.114.29.155]) by g1t0038.austin.hp.com (Postfix) with ESMTP id D84C7300B9; Fri, 23 Nov 2012 21:36:34 +0000 (UTC) Message-ID: <1353706593.5270.103.camel@lorien2> Subject: [PATCH 7/9] sh: dma_debug: add debug_dma_mapping_error support From: Shuah Khan To: Joerg Roedel , a-jacquiot@ti.com, fenghua.yu@intel.com, catalin.marinas@arm.com, lethal@linux-sh.org, benh@kernel.crashing.org, ralf@linux-mips.org, tony.luck@intel.com, davem@davemloft.net, m.szyprowski@samsung.com, msalter@redhat.com, monstr@monstr.eu, Ming Lei Date: Fri, 23 Nov 2012 14:36:33 -0700 Organization: ISS-Linux X-Mailer: Evolution 3.2.3-0ubuntu6 Mime-Version: 1.0 Cc: linux-mips@linux-mips.org, linux-ia64@vger.kernel.org, linux-c6x-dev@linux-c6x.org, linux-sh@vger.kernel.org, microblaze-uclinux@itee.uq.edu.au, LKML , shuahkhan@gmail.com, sparclinux@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: shuah.khan@hp.com List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Add dma-debug interface debug_dma_mapping_error() to debug drivers that fail to check dma mapping errors on addresses returned by dma_map_single() and dma_map_page() interfaces. Signed-off-by: Shuah Khan --- arch/sh/include/asm/dma-mapping.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/sh/include/asm/dma-mapping.h b/arch/sh/include/asm/dma-mapping.h index 8bd965e..b437f2c 100644 --- a/arch/sh/include/asm/dma-mapping.h +++ b/arch/sh/include/asm/dma-mapping.h @@ -46,6 +46,7 @@ static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) { struct dma_map_ops *ops = get_dma_ops(dev); + debug_dma_mapping_error(dev, dma_addr); if (ops->mapping_error) return ops->mapping_error(dev, dma_addr);