[PATCH 0/3] ARM:dma-mapping:Support DMA-API debugging facility on ARM

[PATCH 0/3] ARM:dma-mapping:Support DMA-API debugging facility on ARM

Post by Ming Le » Sun, 19 Jul 2009 00:10:11


On Fri, 17 Jul 2009 09:11:49 +0100



Thank you for the review, and does the patch fix the problem?
If yes, I'll sumbmit the v2 version if necessary or you can use it directly.

From cd2ef8fc869a2e3442fc37d695ca95d286ac6a4d Mon Sep 17 00:00:00 2001
From: Ming Lei < XXXX@XXXXX.COM >
Date: Fri, 17 Jul 2009 22:54:01 +0800
Subject: [PATCH 4/4] ARM:dma-mapping:fix dma_map_sg and dma_unmap_sg

This patch removes unnecessary calling of debug_dma_map_page
and debug_dma_unmap_page in dma_map_sg and dma_unmap_sg.

Signed-off-by: Ming Lei < XXXX@XXXXX.COM >
---
arch/arm/mm/dma-mapping.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 64e5d82..584018c 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -610,7 +610,7 @@ int __dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
int i, j;

for_each_sg(sg, s, nents, i) {
- s->dma_address = dma_map_page(dev, sg_page(s), s->offset,
+ s->dma_address = __dma_map_page(dev, sg_page(s), s->offset,
s->length, dir);
if (dma_mapping_error(dev, s->dma_address))
goto bad_mapping;
@@ -619,7 +619,7 @@ int __dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,

bad_mapping:
for_each_sg(sg, s, i, j)
- dma_unmap_page(dev, sg_dma_address(s), sg_dma_len(s), dir);
+ __dma_unmap_single(dev, sg_dma_address(s), sg_dma_len(s), dir);
return 0;
}
EXPORT_SYMBOL(__dma_map_sg);
@@ -641,7 +641,7 @@ void __dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents,
int i;

for_each_sg(sg, s, nents, i)
- dma_unmap_page(dev, sg_dma_address(s), sg_dma_len(s), dir);
+ __dma_unmap_single(dev, sg_dma_address(s), sg_dma_len(s), dir);
}
EXPORT_SYMBOL(__dma_unmap_sg);

--
1.6.0.GIT




--
Lei Ming
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/
 
 
 

1. [PATCH] arm: dma-mapping: move consistent_init to early_initcall

2. [PATCH 1/8] ARM i.MX dma: implement wrapper for dma functions

2010/8/9 Sascha Hauer < XXXX@XXXXX.COM >:

> + int (*setup_single)(int channel, dma_addr_t mem, int dma_len>th,
> + unsigned in> dmamode);
> + int (*setup_sg)(int channel, struct sc>tterlist *sg,
> + unsigned int sgcount,>unsigned int dma_length,
> + > unsigned int dmamode); >> + void (*enable)(int channel)>
> + void (*disable)(int channel); >> + int (*request)(enum imx_>ma_prio);
> + void>(*free)(int channel);
> + int num_channels;
> +};

This is just getting *so* close to the drivers/dma dmaengine API.

We decided to use the damengine for all our DMA drivers and we
haven't regretted one bit.

There has been some noise about too many drivers stacking up
below arch/arm instead of going to the apropriate subsystem, can't
you atleast contemplate using the dmaengine and help us improve
that subsystem?

I sent some patches to Dan which essentially is a single-buffer
(non-sglist) API, which is all I see missing to fit this need.

Yours,
Linus Walleij
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/

3. [PATCH 8/13] m32r dma-mapping.h should simply include generic/dma-mapping-broken.h

4. [PATCH] dma-mapping: prevent dma dependent code from linking on !HAS_DMA archs

5. [PATCH] x86-64: check for valid DMA data direction in the DMA API

6. [Linaro-mm-sig] [RFC] ARM DMA mapping TODO, v1

7. [RFC] ARM DMA mapping TODO, v1

8. [Bug #13124] ioatdma: DMA-API: device driver frees DMA memory with wrong function

9. 2.6.30-rc1: ioatdma: DMA-API: device driver frees DMA memory with wrong function

10. [Bug #13124] ioatdma: DMA-API: device driver frees DMA memory with wrong function

11. 2.6.30-rc1: ioatdma: DMA-API: device driver frees DMA memory with wrong function

12. [PATCH 03/10] ide: destroy DMA mappings after ending DMA

13. DMA mapping (was [PATCH] cciss 2.6; replaces DMA masks with kernel defines)

14. DMA mapping (was [PATCH] cciss 2.6; replaces DMA masks with kernel defines)

15. DMA mapping (was [PATCH] cciss 2.6; replaces DMA masks with kernel defines)