linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fix default dma_mmap_* pgprot v2
@ 2019-08-05  8:01 Christoph Hellwig
  2019-08-05  8:01 ` [PATCH 1/2] dma-mapping: fix page attributes for dma_mmap_* Christoph Hellwig
  2019-08-05  8:01 ` [PATCH 2/2] MIPS: remove support for DMA_ATTR_WRITE_COMBINE Christoph Hellwig
  0 siblings, 2 replies; 12+ messages in thread
From: Christoph Hellwig @ 2019-08-05  8:01 UTC (permalink / raw)
  To: iommu
  Cc: Shawn Anastasio, Michael Ellerman, Russell King, Catalin Marinas,
	Will Deacon, Robin Murphy, Paul Burton, James Hogan,
	linuxppc-dev, linux-mips, linux-arm-kernel, linux-kernel

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

^ permalink raw reply	[flat|nested] 12+ messages in thread
* fix default dma_mmap_* pgprot v3
@ 2019-08-07  6:16 Christoph Hellwig
  2019-08-07  6:16 ` [PATCH 2/2] MIPS: remove support for DMA_ATTR_WRITE_COMBINE Christoph Hellwig
  0 siblings, 1 reply; 12+ messages in thread
From: Christoph Hellwig @ 2019-08-07  6:16 UTC (permalink / raw)
  To: iommu
  Cc: Shawn Anastasio, Michael Ellerman, Russell King, Catalin Marinas,
	Will Deacon, Robin Murphy, Paul Burton, James Hogan,
	linuxppc-dev, linux-mips, linux-arm-kernel, linux-kernel

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-09-18 19:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-05  8:01 fix default dma_mmap_* pgprot v2 Christoph Hellwig
2019-08-05  8:01 ` [PATCH 1/2] dma-mapping: fix page attributes for dma_mmap_* Christoph Hellwig
2019-08-05  9:10   ` Catalin Marinas
     [not found]   ` <CAP_+7SzPdNCMKuuXMjHjpCzxsey2YWR_e6mTAWtNSZ6kKBvKFw@mail.gmail.com>
2019-08-06  2:55     ` Gavin Li
2019-08-06  5:12       ` Christoph Hellwig
2019-08-06 19:39   ` Shawn Anastasio
2019-08-07  6:04     ` Christoph Hellwig
2019-08-07 11:45       ` Shawn Anastasio
2019-08-05  8:01 ` [PATCH 2/2] MIPS: remove support for DMA_ATTR_WRITE_COMBINE Christoph Hellwig
2019-08-05  8:06   ` Sergei Shtylyov
2019-08-07  6:16 fix default dma_mmap_* pgprot v3 Christoph Hellwig
2019-08-07  6:16 ` [PATCH 2/2] MIPS: remove support for DMA_ATTR_WRITE_COMBINE Christoph Hellwig
2019-09-18 19:50   ` Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).