All of lore.kernel.org
 help / color / mirror / Atom feed
* consolidate direct dma mapping V3
@ 2018-01-10  7:59 ` Christoph Hellwig
  0 siblings, 0 replies; 269+ messages in thread
From: Christoph Hellwig @ 2018-01-10  7:59 UTC (permalink / raw)
  To: iommu
  Cc: linux-mips, linux-ia64, linux-sh, sparclinux, Guan Xuetao,
	linux-arch, linux-s390, linux-c6x-dev, linux-hexagon, x86,
	Konrad Rzeszutek Wilk, linux-snps-arc, linux-m68k, patches,
	linux-metag, linux-arm-kernel, Michal Simek, linux-parisc,
	linux-cris-kernel, linux-kernel, linux-alpha, linuxppc-dev

Almost every architecture supports a direct dma mapping implementation,
where no iommu is used and the device dma address is a 1:1 mapping to
the physical address or has a simple linear offset.  Currently the
code for this implementation is most duplicated over the architectures,
and the duplicated again in the swiotlb code, and then duplicated again
for special cases like the x86 memory encryption DMA ops.

This series takes the existing very simple dma-noop dma mapping
implementation, enhances it with all the x86 features and quirks, and
creates a common set of architecture hooks for it and the swiotlb code.

It then switches a number of architectures to this generic
direct map implemention.

Note that for now this only handles architectures that do cache coherent
DMA, but a similar consolidation for non-coherent architectures is in the
work for later merge windows.

A git tree is also available:

   git://git.infradead.org/users/hch/misc.git dma-direct.3

Gitweb:

   http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/dma-direct.3

Changes since V1:
 - fixed a few patch description typos
 - fixed a few printk formats
 - fixed an off by one in dma_coherent_ok
 - add a few Reviewed-by/Acked-by tags.
 - moved the swiotlb consolidation to a new series
 - dropped a few patches for now to not overwhelem the x86
   maintainers.  They will be resubmitted in the next merge window

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

end of thread, other threads:[~2018-01-12 13:17 UTC | newest]

Thread overview: 269+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-10  7:59 consolidate direct dma mapping V3 Christoph Hellwig
2018-01-10  7:59 ` Christoph Hellwig
2018-01-10  7:59 ` Christoph Hellwig
2018-01-10  7:59 ` Christoph Hellwig
2018-01-10  7:59 ` Christoph Hellwig
2018-01-10  7:59 ` [PATCH 01/33] alpha: mark jensen as broken Christoph Hellwig
2018-01-10  7:59 ` [PATCH 02/33] hexagon: remove unused flush_write_buffers definition Christoph Hellwig
2018-01-10  7:59   ` Christoph Hellwig
2018-01-10  7:59   ` Christoph Hellwig
2018-01-10  7:59   ` Christoph Hellwig
2018-01-10  7:59 ` [PATCH 03/33] m32r: " Christoph Hellwig
2018-01-10  7:59 ` [PATCH 04/33] powerpc: " Christoph Hellwig
2018-01-10  7:59 ` [PATCH 05/33] arc: remove CONFIG_ARC_PLAT_NEEDS_PHYS_TO_DMA Christoph Hellwig
2018-01-10  7:59 ` Christoph Hellwig
2018-01-10  7:59   ` Christoph Hellwig
2018-01-10  7:59   ` Christoph Hellwig
2018-01-10  7:59   ` Christoph Hellwig
2018-01-10  8:00 ` [PATCH 06/33] m32r: remove the unused dma_capable helper Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00 ` Christoph Hellwig
2018-01-10  8:00 ` [PATCH 07/33] riscv: " Christoph Hellwig
2018-01-10  8:00 ` [PATCH 08/33] s390: " Christoph Hellwig
2018-01-10  8:00 ` [PATCH 09/33] dma-mapping: take dma_pfn_offset into account in dma_max_pfn Christoph Hellwig
2018-01-10  8:00 ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10 11:07   ` Robin Murphy
2018-01-10 11:07     ` Robin Murphy
2018-01-10 11:07     ` Robin Murphy
2018-01-10  8:00 ` [PATCH 10/33] arm64: don't override dma_max_pfn Christoph Hellwig
2018-01-10  8:00 ` [PATCH 11/33] dma-mapping: move swiotlb arch helpers to a new header Christoph Hellwig
2018-01-10  8:00 ` [PATCH 12/33] dma-mapping: move dma_mark_clean to dma-direct.h Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00 ` Christoph Hellwig
2018-01-10  8:00 ` [PATCH 13/33] hexagon: use the generic dma_capable helper Christoph Hellwig
2018-01-10  8:00 ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00 ` [PATCH 14/33] powerpc: rename dma_direct_ to dma_nommu_ Christoph Hellwig
2018-01-10  8:00 ` [PATCH 15/33] microblaze: rename dma_direct to dma_nommu Christoph Hellwig
2018-01-10  8:00 ` [PATCH 16/33] microblaze: remove dma_nommu_dma_supported Christoph Hellwig
2018-01-10  8:00 ` [PATCH 17/33] microblaze: remove the dead !NOT_COHERENT_CACHE dma code Christoph Hellwig
2018-01-10  8:00 ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
     [not found] ` <20180110080027.13879-1-hch-jcswGhMUV9g@public.gmane.org>
2018-01-10  7:59   ` [PATCH 01/33] alpha: mark jensen as broken Christoph Hellwig
2018-01-10  7:59     ` Christoph Hellwig
2018-01-10  7:59     ` Christoph Hellwig
2018-01-10  7:59     ` Christoph Hellwig
2018-01-10  7:59     ` Christoph Hellwig
2018-01-10  7:59   ` [PATCH 03/33] m32r: remove unused flush_write_buffers definition Christoph Hellwig
2018-01-10  7:59     ` Christoph Hellwig
2018-01-10  7:59     ` Christoph Hellwig
2018-01-10  7:59     ` Christoph Hellwig
2018-01-10  7:59     ` Christoph Hellwig
2018-01-10  7:59   ` [PATCH 04/33] powerpc: " Christoph Hellwig
2018-01-10  7:59     ` Christoph Hellwig
2018-01-10  7:59     ` Christoph Hellwig
2018-01-10  7:59     ` Christoph Hellwig
2018-01-10  7:59     ` Christoph Hellwig
2018-01-10  8:00   ` [PATCH 07/33] riscv: remove the unused dma_capable helper Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00   ` [PATCH 08/33] s390: " Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00   ` [PATCH 10/33] arm64: don't override dma_max_pfn Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10 11:08     ` Robin Murphy
2018-01-10 11:08       ` Robin Murphy
2018-01-10 11:08       ` Robin Murphy
2018-01-10  8:00   ` [PATCH 11/33] dma-mapping: move swiotlb arch helpers to a new header Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  9:31     ` Vladimir Murzin
2018-01-10  9:31     ` Vladimir Murzin
2018-01-10  9:31       ` Vladimir Murzin
2018-01-10  9:31       ` Vladimir Murzin
2018-01-10 15:22       ` Christoph Hellwig
2018-01-10 15:22       ` Christoph Hellwig
2018-01-10 15:22         ` Christoph Hellwig
2018-01-10 15:22         ` Christoph Hellwig
2018-01-10 15:22         ` Christoph Hellwig
2018-01-10 14:56     ` Robin Murphy
     [not found]     ` <20180110080027.13879-12-hch-jcswGhMUV9g@public.gmane.org>
2018-01-10 14:56       ` Robin Murphy
2018-01-10 14:56         ` Robin Murphy
2018-01-10 14:56         ` Robin Murphy
2018-01-10 14:56         ` Robin Murphy
2018-01-10 14:56         ` Robin Murphy
2018-01-10 15:26         ` Christoph Hellwig
2018-01-10 15:26           ` Christoph Hellwig
2018-01-10 15:26           ` Christoph Hellwig
2018-01-10 15:26           ` Christoph Hellwig
2018-01-10 15:31           ` Robin Murphy
2018-01-10 15:31           ` Robin Murphy
2018-01-10 15:31             ` Robin Murphy
2018-01-10 15:31             ` Robin Murphy
2018-01-10 15:40             ` Christoph Hellwig
2018-01-10 15:40               ` Christoph Hellwig
2018-01-10 15:40               ` Christoph Hellwig
2018-01-10 15:40               ` Christoph Hellwig
2018-01-10  8:00   ` [PATCH 14/33] powerpc: rename dma_direct_ to dma_nommu_ Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00   ` [PATCH 15/33] microblaze: rename dma_direct to dma_nommu Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00   ` [PATCH 16/33] microblaze: remove dma_nommu_dma_supported Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00   ` [PATCH 18/33] s390: move s390_pci_dma_ops to asm/pci_dma.h Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00   ` [PATCH 19/33] dma-mapping: warn when there is no coherent_dma_mask Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
     [not found]     ` <20180110080027.13879-20-hch-jcswGhMUV9g@public.gmane.org>
2018-01-12 13:16       ` Konrad Rzeszutek Wilk
2018-01-12 13:16         ` Konrad Rzeszutek Wilk
2018-01-12 13:16         ` Konrad Rzeszutek Wilk
2018-01-12 13:16         ` Konrad Rzeszutek Wilk
2018-01-12 13:16         ` Konrad Rzeszutek Wilk
2018-01-12 13:16     ` Konrad Rzeszutek Wilk
2018-01-10  8:00   ` [PATCH 20/33] dma-mapping: clear harmful GFP_* flags in common code Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10 11:59     ` Robin Murphy
     [not found]     ` <20180110080027.13879-21-hch-jcswGhMUV9g@public.gmane.org>
2018-01-10 11:59       ` Robin Murphy
2018-01-10 11:59         ` Robin Murphy
2018-01-10 11:59         ` Robin Murphy
2018-01-10 11:59         ` Robin Murphy
2018-01-10 11:59         ` Robin Murphy
2018-01-10 15:29         ` Christoph Hellwig
2018-01-10 15:29           ` Christoph Hellwig
2018-01-10 15:29           ` Christoph Hellwig
2018-01-10 15:29           ` Christoph Hellwig
2018-01-10  8:00   ` [PATCH 27/33] dma-direct: use node local allocations for coherent memory Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10  8:00     ` Christoph Hellwig
2018-01-10 12:06     ` Robin Murphy
2018-01-10 12:06       ` Robin Murphy
2018-01-10 12:06       ` Robin Murphy
2018-01-10 15:30       ` Christoph Hellwig
     [not found]       ` <3672aa56-b85c-5d2c-0c0e-709031b0c0a0-5wv7dgnIgG8@public.gmane.org>
2018-01-10 15:30         ` Christoph Hellwig
2018-01-10 15:30           ` Christoph Hellwig
2018-01-10 15:30           ` Christoph Hellwig
2018-01-10 15:30           ` Christoph Hellwig
2018-01-10 15:30           ` Christoph Hellwig
2018-01-10 16:49           ` Robin Murphy
2018-01-10 16:49             ` Robin Murphy
2018-01-10 16:49             ` Robin Murphy
2018-01-10  8:00 ` [PATCH 18/33] s390: move s390_pci_dma_ops to asm/pci_dma.h Christoph Hellwig
2018-01-10  8:00 ` [PATCH 19/33] dma-mapping: warn when there is no coherent_dma_mask Christoph Hellwig
2018-01-10  8:00 ` [PATCH 20/33] dma-mapping: clear harmful GFP_* flags in common code Christoph Hellwig
2018-01-10  8:00 ` [PATCH 21/33] dma-mapping: add an arch_dma_supported hook Christoph Hellwig
2018-01-10  8:00 ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-12 13:17   ` Konrad Rzeszutek Wilk
2018-01-12 13:17     ` Konrad Rzeszutek Wilk
2018-01-12 13:17     ` Konrad Rzeszutek Wilk
2018-01-12 13:17     ` Konrad Rzeszutek Wilk
2018-01-12 13:17   ` Konrad Rzeszutek Wilk
2018-01-10  8:00 ` [PATCH 22/33] dma-mapping: provide a generic asm/dma-mapping.h Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00 ` Christoph Hellwig
2018-01-10  8:00 ` [PATCH 23/33] dma-direct: rename dma_noop to dma_direct Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00 ` Christoph Hellwig
2018-01-10  8:00 ` [PATCH 24/33] dma-direct: use phys_to_dma Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00 ` Christoph Hellwig
2018-01-10  8:00 ` [PATCH 25/33] dma-direct: add dma address sanity checks Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00 ` Christoph Hellwig
2018-01-10  8:00 ` [PATCH 26/33] dma-direct: add support for CMA allocation Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00 ` [PATCH 27/33] dma-direct: use node local allocations for coherent memory Christoph Hellwig
2018-01-10  8:00 ` [PATCH 28/33] dma-direct: add support for allocation from ZONE_DMA and ZONE_DMA32 Christoph Hellwig
2018-01-10  8:00 ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00 ` [PATCH 29/33] dma-direct: retry allocations using GFP_DMA for small masks Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  9:32   ` Vladimir Murzin
2018-01-10  9:32   ` Vladimir Murzin
2018-01-10  9:32     ` Vladimir Murzin
2018-01-10  9:32     ` Vladimir Murzin
2018-01-10  8:00 ` Christoph Hellwig
2018-01-10  8:00 ` [PATCH 30/33] dma-direct: make dma_direct_{alloc,free} available to other implementations Christoph Hellwig
2018-01-10  8:00   ` [PATCH 30/33] dma-direct: make dma_direct_{alloc, free} " Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` [PATCH 30/33] dma-direct: make dma_direct_{alloc,free} " Christoph Hellwig
2018-01-10  8:00 ` Christoph Hellwig
2018-01-10  8:00 ` [PATCH 31/33] dma-direct: reject too small dma masks Christoph Hellwig
2018-01-10  8:00 ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10 11:49   ` Robin Murphy
2018-01-10 11:49     ` Robin Murphy
2018-01-10 11:49     ` Robin Murphy
2018-01-10 11:49     ` Robin Murphy
2018-01-10 15:32     ` Christoph Hellwig
2018-01-10 15:32       ` Christoph Hellwig
2018-01-10 15:32       ` Christoph Hellwig
2018-01-10 15:32       ` Christoph Hellwig
2018-01-10 17:00       ` Robin Murphy
2018-01-10 17:00         ` Robin Murphy
2018-01-10 17:00         ` Robin Murphy
2018-01-10 17:00       ` Robin Murphy
2018-01-10  8:00 ` [PATCH 32/33] cris: use dma-direct Christoph Hellwig
2018-01-10  8:00 ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10 15:27   ` Alexey Brodkin
2018-01-10 15:41     ` hch
2018-01-10 15:41       ` hch-jcswGhMUV9g
2018-01-10  8:00 ` [PATCH 33/33] h8300: " Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00   ` Christoph Hellwig
2018-01-10  8:00 ` Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.