Cache maintenance in arm_iommu_alloc_attrs for iommu_coherent_ops

Marek Szyprowski m.szyprowski at samsung.com
Thu May 22 01:31:47 PDT 2014


Hello,

On 2014-05-21 11:37, Ritesh Harjani wrote:
> arm_iommu_mmap_attrs function for iommu_coherent_ops(and also for
> noncoherent iommu_ops) calls for __get_dma_pgprot.
>
>   628 static inline pgprot_t __get_dma_pgprot(struct dma_attrs *attrs,
> pgprot_t prot)
>   629 {
>   630         prot = dma_get_attr(DMA_ATTR_WRITE_COMBINE, attrs) ?
>   631                             pgprot_writecombine(prot) :
>   632                             pgprot_dmacoherent(prot);
>   633         return prot;
>   634 }
>
> Now if someone calls for dma_mmap_coherent, then we should not be
> changing the memory to be uncached always to make it coherent right
> (from functino __get_dma_pgprot above) ??
> It should be based on dma_map_ops, and if it is iommu_coherent_ops,
> then we should not change the memory to be uncached ??

Once again you are right. This also need to be fixed.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland




More information about the linux-arm-kernel mailing list