Skip to content

x86 dma_*_coherent rework patchset v2

Joerg Roedel lkml 1 version Applied

Status from this message: applied to tip/x86/iommu - thanks Joerg!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 16 repliesApplied

Changes since v1 from the cover letter

- fixed wrong logic in the pci-nommu alloc_coherent code
- moved dma_*_coherent to include/asm-x86/dma-mapping.h

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/8x86: add alloc_coherent dma_ops callback to GART driverarch/x86/kernel/pci-gart_64.c+21 -08 replies
2/8x86: add free_coherent dma_ops callback to GART driverarch/x86/kernel/pci-gart_64.c+10 -00 replies
3/8x86: add free_coherent dma_ops callback to Calgary IOMMU driverarch/x86/kernel/pci-calgary_64.c+14 -00 replies
4/8x86: add alloc_coherent dma_ops callback to NOMMU driverarch/x86/kernel/pci-nommu.c+55 -00 replies
5/8x86: add free_coherent dma_ops callback to NOMMU driverarch/x86/kernel/pci-nommu.c+7 -00 replies
6/8x86: cleanup dma_*_coherent functionsarch/x86/kernel/pci-dma.c+12 -1090 replies
7/8x86: move dma_*_coherent functions to include filearch/x86/kernel/pci-dma.c arch/x86/kernel/pci-gart_64.c include/asm-x86/dma-mapping.h+42 -580 replies
8/8x86, AMD IOMMU: remove obsolete FIXME commentarch/x86/kernel/amd_iommu.c+0 -20 replies

Reviews trailers per patch

1 of 8 patches has a Reviewed-by or Acked-by.

PatchMuli Ben-Yehuda
1/8
2/8
3/8A-b
4/8
5/8
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/8] x86 dma_*_coherent rework patchset v2

Hi,

this patchset reworks the dma_*_coherent functions in the DMA layer for the x86 architecture. The patch series extends the existing DMA backends with missing *coherent callbacks and simplifies the generic function to basically only call the registered backend. This allows future optimizations in hardware specific IOMMU implementations.
The code ist tested on AMD64 with AMD IOMMU, GART, SWIOTLB and NOMMU as well as on my old 486 box. Muli tested the Calgary specific patch.

Joerg

Changes since v1:

- fixed wrong logic in the pci-nommu alloc_coherent code
- moved dma_*_coherent to include/asm-x86/dma-mapping.h

git diff --stat tip/master.. :

 arch/x86/kernel/amd_iommu.c      |    2 -
 arch/x86/kernel/pci-calgary_64.c |   14 ++++
 arch/x86/kernel/pci-dma.c        |  146 +-------------------------------------
 arch/x86/kernel/pci-gart_64.c    |   35 +++++++++-
 arch/x86/kernel/pci-nommu.c      |   62 ++++++++++++++++
 include/asm-x86/dma-mapping.h    |   47 ++++++++++---
 6 files changed, 149 insertions(+), 157 deletions(-)