diff mbox

[13/22] nds32: use generic dma_noncoherent_ops

Message ID 20180426064239.GA13895@lst.de (mailing list archive)
State Awaiting Upstream
Headers show

Commit Message

Christoph Hellwig April 26, 2018, 6:42 a.m. UTC
Can you try this patch ontop of either the new or original one?

---
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Greentime Hu April 26, 2018, 8:06 a.m. UTC | #1
2018-04-26 14:42 GMT+08:00 Christoph Hellwig <hch@lst.de>:
> Can you try this patch ontop of either the new or original one?
>
> ---
> diff --git a/lib/dma-noncoherent.c b/lib/dma-noncoherent.c
> index f4b8532c20ac..a2c192b3508d 100644
> --- a/lib/dma-noncoherent.c
> +++ b/lib/dma-noncoherent.c
> @@ -48,7 +48,7 @@ static int dma_noncoherent_map_sg(struct device *dev, struct scatterlist *sgl,
>         return nents;
>  }
>
> -#ifdef CONFIG_DMA_NONCOHERENT_SYNC_FOR_CPU
> +#ifdef CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU
>  static void dma_noncoherent_sync_single_for_cpu(struct device *dev,
>                 dma_addr_t addr, size_t size, enum dma_data_direction dir)
>  {
> @@ -88,7 +88,7 @@ const struct dma_map_ops dma_noncoherent_ops = {
>         .sync_sg_for_device     = dma_noncoherent_sync_sg_for_device,
>         .map_page               = dma_noncoherent_map_page,
>         .map_sg                 = dma_noncoherent_map_sg,
> -#ifdef CONFIG_DMA_NONCOHERENT_SYNC_FOR_CPU
> +#ifdef CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU
>         .sync_single_for_cpu    = dma_noncoherent_sync_single_for_cpu,
>         .sync_sg_for_cpu        = dma_noncoherent_sync_sg_for_cpu,
>         .unmap_page             = dma_noncoherent_unmap_page,

It works!!!
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Christoph Hellwig April 26, 2018, 8:24 a.m. UTC | #2
On Thu, Apr 26, 2018 at 04:06:34PM +0800, Greentime Hu wrote:
> It works!!!

Thanks!

Can you retest the updated tree here with all the fixes and give me
your Tested-by: for the generic and nds32 patches?

git://git.infradead.org/users/hch/misc.git generic-dma-noncoherent
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Greentime Hu April 26, 2018, 9:39 a.m. UTC | #3
2018-04-26 16:24 GMT+08:00 Christoph Hellwig <hch@lst.de>:
> On Thu, Apr 26, 2018 at 04:06:34PM +0800, Greentime Hu wrote:
>> It works!!!
>
> Thanks!
>
> Can you retest the updated tree here with all the fixes and give me
> your Tested-by: for the generic and nds32 patches?
>
> git://git.infradead.org/users/hch/misc.git generic-dma-noncoherent

Sorry Christoph. I found the previous mail I said it works was wrong
because I used a wrong vmlinux.
It still failed. >,<
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/lib/dma-noncoherent.c b/lib/dma-noncoherent.c
index f4b8532c20ac..a2c192b3508d 100644
--- a/lib/dma-noncoherent.c
+++ b/lib/dma-noncoherent.c
@@ -48,7 +48,7 @@  static int dma_noncoherent_map_sg(struct device *dev, struct scatterlist *sgl,
 	return nents;
 }
 
-#ifdef CONFIG_DMA_NONCOHERENT_SYNC_FOR_CPU
+#ifdef CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU
 static void dma_noncoherent_sync_single_for_cpu(struct device *dev,
 		dma_addr_t addr, size_t size, enum dma_data_direction dir)
 {
@@ -88,7 +88,7 @@  const struct dma_map_ops dma_noncoherent_ops = {
 	.sync_sg_for_device	= dma_noncoherent_sync_sg_for_device,
 	.map_page		= dma_noncoherent_map_page,
 	.map_sg			= dma_noncoherent_map_sg,
-#ifdef CONFIG_DMA_NONCOHERENT_SYNC_FOR_CPU
+#ifdef CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU
 	.sync_single_for_cpu	= dma_noncoherent_sync_single_for_cpu,
 	.sync_sg_for_cpu	= dma_noncoherent_sync_sg_for_cpu,
 	.unmap_page		= dma_noncoherent_unmap_page,