Re: [PATCH 2/2] MIPS: Loongson64: Add cache_sync to loongson_dma_map_ops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 25, 2018 at 04:44:36PM +0800, Huacai Chen wrote:
> Yes, kmalloc()'d memory with the appropriate GFP_DMA flags can be

You should never use GFP_DMA in kmalloc calls in new code.

> synced using the dma_map_*() and dma_unmap_*() functions. So,
> loongson_dma_map_page()/loongson_dma_unmap_page() (which is the
> backend of dma_map_*() and dma_unmap_*()) should call dma_cache_sync()
> for non-coherent devices, right?

No, it should call the internal dma sync for device/cpu calls, as already
explained by James.  Note that for 4.17 or 4.18 I plan to extent
the dma-direct work to not dma coherent systems, so we'll get an
explicit and document ABI for those across platforms.  That is if
I can pull it off as it doesn't seem entirely trivial.


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux