diff mbox

ARM: dma-mapping: support debug_dma_mapping_error

Message ID 1350909843-5273-1-git-send-email-ming.lei@canonical.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ming Lei Oct. 22, 2012, 12:44 p.m. UTC
Without the patch, kind of below warning will be dumped if DMA-API
debug is enabled:

[   11.069763] ------------[ cut here ]------------
[   11.074645] WARNING: at lib/dma-debug.c:948 check_unmap+0x770/0x860()
[   11.081420] ehci-omap ehci-omap.0: DMA-API: device driver failed to
check map error[device address=0x0000000
0adb78e80] [size=8 bytes] [mapped as single]
[   11.095611] Modules linked in:

Cc: Russell King <linux@arm.linux.org.uk>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
---
 arch/arm/include/asm/dma-mapping.h |    1 +
 1 file changed, 1 insertion(+)

Comments

Marek Szyprowski Oct. 23, 2012, 11:39 a.m. UTC | #1
Hello,

On 10/22/2012 2:44 PM, Ming Lei wrote:

> Without the patch, kind of below warning will be dumped if DMA-API
> debug is enabled:
>
> [   11.069763] ------------[ cut here ]------------
> [   11.074645] WARNING: at lib/dma-debug.c:948 check_unmap+0x770/0x860()
> [   11.081420] ehci-omap ehci-omap.0: DMA-API: device driver failed to
> check map error[device address=0x0000000
> 0adb78e80] [size=8 bytes] [mapped as single]
> [   11.095611] Modules linked in:
>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Ming Lei <ming.lei@canonical.com>

Thanks for the patch, I've applied it to my kernel tree.

> ...

Best regards
Russell King - ARM Linux Oct. 26, 2012, 10:43 a.m. UTC | #2
On Mon, Oct 22, 2012 at 08:44:03PM +0800, Ming Lei wrote:
> Without the patch, kind of below warning will be dumped if DMA-API
> debug is enabled:
> 
> [   11.069763] ------------[ cut here ]------------
> [   11.074645] WARNING: at lib/dma-debug.c:948 check_unmap+0x770/0x860()
> [   11.081420] ehci-omap ehci-omap.0: DMA-API: device driver failed to
> check map error[device address=0x0000000
> 0adb78e80] [size=8 bytes] [mapped as single]
> [   11.095611] Modules linked in:
> 
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Ming Lei <ming.lei@canonical.com>

Would you mind explaining why you think it's fine to send a patch for the
mainline kernel adding a function call to a header file which is not even
in the mainline kernel?

My guess is that the Canonical kernel has some additional checking here
which mainline kernels don't have, which means your patch should never have
been submitted (or even applied.)

On Marek's side, why didn't you try to build your tree at least once in
the last 3 days before pushing this patch to Linus?
Ming Lei Oct. 26, 2012, 12:47 p.m. UTC | #3
On Fri, Oct 26, 2012 at 6:43 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Mon, Oct 22, 2012 at 08:44:03PM +0800, Ming Lei wrote:
>> Without the patch, kind of below warning will be dumped if DMA-API
>> debug is enabled:
>>
>> [   11.069763] ------------[ cut here ]------------
>> [   11.074645] WARNING: at lib/dma-debug.c:948 check_unmap+0x770/0x860()
>> [   11.081420] ehci-omap ehci-omap.0: DMA-API: device driver failed to
>> check map error[device address=0x0000000
>> 0adb78e80] [size=8 bytes] [mapped as single]
>> [   11.095611] Modules linked in:
>>
>> Cc: Russell King <linux@arm.linux.org.uk>
>> Cc: Marek Szyprowski <m.szyprowski@samsung.com>
>> Signed-off-by: Ming Lei <ming.lei@canonical.com>
>
> Would you mind explaining why you think it's fine to send a patch for the
> mainline kernel adding a function call to a header file which is not even
> in the mainline kernel?

Sorry, I should have made it explicitly that the patch is against -next tree.

Thanks,
--
Ming Lei
diff mbox

Patch

diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
index 2300484..78d8e9b 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -91,6 +91,7 @@  static inline dma_addr_t virt_to_dma(struct device *dev, void *addr)
  */
 static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
 {
+	debug_dma_mapping_error(dev, dma_addr);
 	return dma_addr == DMA_ERROR_CODE;
 }