fix default dma_mmap_* pgprot v3
Hi all, As Shawn pointed out we've had issues with the dma mmap pgprots ever since the dma_common_mmap helper was added beyong the initial architectures - we default to uncached mappings, but for devices that are DMA coherent, or if the DMA_ATTR_NON_CONSISTENT is set (and supported) this can lead to aliasing of cache attributes. This patch fixes that. My explanation of why this hasn't been much of an issue is that the dma_mmap_ helpers aren't used widely and mostly just in architecture specific drivers. Changes since v2: - fix m68knommu compile by inlining dma_prprot helper and providing a stub for !CONFIG_MMU - fix various typos in the commit messages Changes since v1: - fix handling of DMA_ATTR_NON_CONSISTENT where it is a no-op (which is most architectures) - remove DMA_ATTR_WRITE_COMBINE on mips, as it seem dangerous as-is
fix default dma_mmap_* pgprot v2
Hi all, As Shawn pointed out we've had issues with the dma mmap pgprots ever since the dma_common_mmap helper was added beyong the initial architectures - we default to uncached mappings, but for devices that are DMA coherent, or if the DMA_ATTR_NON_CONSISTENT is set (and supported) this can lead to aliasing of cache attributes. This patch fixes that. My explanation of why this hasn't been much of an issue is that the dma_mmap_ helpers aren't used widely and mostly just in architecture specific drivers. Changes since v1: - fix handling of DMA_ATTR_NON_CONSISTENT where it is a no-op (which is most architectures) - remove DMA_ATTR_WRITE_COMBINE on mips, as it seem dangerous as-is
fix default dma_mmap_* pgprot
Hi all, As Shawn pointed out we've had issues with the dma mmap pgprots ever since the dma_common_mmap helper was added beyong the initial architectures - we default to uncached mappings, but for devices that are DMA coherent, or if the DMA_ATTR_NON_CONSISTENT is set (and supported) this can lead to aliasing of cache attributes. This patch fixes that. My explanation of why this hasn't been much of an issue is that the dma_mmap_ helpers aren't used widely and mostly just in architecture specific drivers.