All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] dma-mapping: Clean up arch_setup_dma_ops()
@ 2023-11-29 17:42 ` Robin Murphy
  0 siblings, 0 replies; 61+ messages in thread
From: Robin Murphy @ 2023-11-29 17:42 UTC (permalink / raw)
  To: Joerg Roedel, Christoph Hellwig
  Cc: Vineet Gupta, Russell King, Catalin Marinas, Will Deacon,
	Huacai Chen, WANG Xuerui, Thomas Bogendoerfer, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Lorenzo Pieralisi, Hanjun Guo,
	Sudeep Holla, K. Y. Srinivasan, Haiyang Zhang, Wei Liu,
	Dexuan Cui, Suravee Suthikulpanit, David Woodhouse, Lu Baolu,
	Niklas Schnelle, Matthew Rosato, Gerald Schaefer,
	Jean-Philippe Brucker, Rob Herring, Frank Rowand,
	Marek Szyprowski, Jason Gunthorpe, linux-kernel,
	linux-arm-kernel, linux-acpi, iommu, devicetree

Hi all,

Prompted by Jason's proposal[1], here's a first step towards truly
unpicking the dma_configure vs. IOMMU mess. As I commented before, we
have an awful lot of accumulated cruft and technical debt here making
things more complicated than they need to be, and we already have hacks
on top of hacks trying to work around it, so polishing those hacks even
further is really not a desirable direction of travel. And I do know
they're hacks, because I wrote most of them and still remember enough of
the context of the time ;)

I'm taking a methodical bottom-up approach here, so step 1 is cleaning
*all* the out-of-date stuff from arch_setup_dma_ops() and simplifying
that interface, which gets it right out of the way for the next step of
pulling apart {of,acpi}_dma_configure(). This part is really a
dma-mapping series, but I'm not sure yet if would need to target the
IOMMU tree - nothing here should strictly depend on the pending IOMMU
change, but the follow-up patches might. Still working on those, so
hopefully I'll know soon...

Thanks,
Robin.

[1] https://lore.kernel.org/linux-iommu/0-v1-720585788a7d+811b-iommu_fwspec_p1_jgg@nvidia.com/


Robin Murphy (7):
  OF: Retire dma-ranges mask workaround
  OF: Simplify DMA range calculations
  ACPI/IORT: Handle memory address size limits as limits
  dma-mapping: Add helpers for dma_range_map bounds
  iommu/dma: Make limit checks self-contained
  iommu/dma: Centralise iommu_setup_dma_ops()
  dma-mapping: Simplify arch_setup_dma_ops()

 arch/arc/mm/dma.c               |  3 +--
 arch/arm/mm/dma-mapping-nommu.c |  3 +--
 arch/arm/mm/dma-mapping.c       | 12 ++++++----
 arch/arm64/mm/dma-mapping.c     |  5 +---
 arch/loongarch/kernel/dma.c     |  9 ++-----
 arch/mips/mm/dma-noncoherent.c  |  3 +--
 arch/riscv/mm/dma-noncoherent.c |  3 +--
 drivers/acpi/arm64/dma.c        | 17 ++++---------
 drivers/acpi/arm64/iort.c       | 18 +++++++-------
 drivers/acpi/scan.c             |  3 +--
 drivers/hv/hv_common.c          |  6 +----
 drivers/iommu/amd/iommu.c       |  8 -------
 drivers/iommu/dma-iommu.c       | 35 ++++++++++-----------------
 drivers/iommu/dma-iommu.h       |  6 +++++
 drivers/iommu/intel/iommu.c     |  7 ------
 drivers/iommu/iommu.c           |  2 ++
 drivers/iommu/s390-iommu.c      |  6 -----
 drivers/iommu/virtio-iommu.c    | 10 --------
 drivers/of/device.c             | 42 ++++++---------------------------
 include/linux/acpi_iort.h       |  4 ++--
 include/linux/dma-direct.h      | 18 ++++++++++++++
 include/linux/dma-map-ops.h     |  6 ++---
 include/linux/iommu.h           |  7 ------
 23 files changed, 78 insertions(+), 155 deletions(-)

-- 
2.39.2.101.g768bb238c484.dirty


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

end of thread, other threads:[~2023-12-11 17:14 UTC | newest]

Thread overview: 61+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-29 17:42 [PATCH 0/7] dma-mapping: Clean up arch_setup_dma_ops() Robin Murphy
2023-11-29 17:42 ` Robin Murphy
2023-11-29 17:42 ` [PATCH 1/7] OF: Retire dma-ranges mask workaround Robin Murphy
2023-11-29 17:42   ` Robin Murphy
2023-11-30 14:46   ` Rob Herring
2023-11-30 14:46     ` Rob Herring
2023-11-29 17:42 ` [PATCH 2/7] OF: Simplify DMA range calculations Robin Murphy
2023-11-29 17:42   ` Robin Murphy
2023-11-30  0:46   ` Jason Gunthorpe
2023-11-30  0:46     ` Jason Gunthorpe
2023-11-30 14:56   ` Rob Herring
2023-11-30 14:56     ` Rob Herring
2023-11-29 17:43 ` [PATCH 3/7] ACPI/IORT: Handle memory address size limits as limits Robin Murphy
2023-11-29 17:43   ` Robin Murphy
2023-11-30  0:39   ` Jason Gunthorpe
2023-11-30  0:39     ` Jason Gunthorpe
2023-12-11 13:27   ` Will Deacon
2023-12-11 13:27     ` Will Deacon
2023-12-11 15:01     ` Robin Murphy
2023-12-11 15:01       ` Robin Murphy
2023-12-11 15:30       ` Will Deacon
2023-12-11 15:30         ` Will Deacon
2023-12-11 15:36         ` Jason Gunthorpe
2023-12-11 15:36           ` Jason Gunthorpe
2023-12-11 15:37         ` Robin Murphy
2023-12-11 15:37           ` Robin Murphy
2023-12-11 15:39         ` Mark Rutland
2023-12-11 15:39           ` Mark Rutland
2023-12-11 16:13           ` Robin Murphy
2023-12-11 16:13             ` Robin Murphy
2023-12-11 15:37       ` Mark Rutland
2023-12-11 15:37         ` Mark Rutland
2023-11-29 17:43 ` [PATCH 4/7] dma-mapping: Add helpers for dma_range_map bounds Robin Murphy
2023-11-29 17:43   ` Robin Murphy
2023-11-29 20:40   ` Jason Gunthorpe
2023-11-29 20:40     ` Jason Gunthorpe
2023-11-30  6:11   ` kernel test robot
2023-11-30  6:11   ` kernel test robot
2023-12-04  8:43   ` Christoph Hellwig
2023-12-04  8:43     ` Christoph Hellwig
2023-11-29 17:43 ` [PATCH 5/7] iommu/dma: Make limit checks self-contained Robin Murphy
2023-11-29 17:43   ` Robin Murphy
2023-11-29 20:43   ` Jason Gunthorpe
2023-11-29 20:43     ` Jason Gunthorpe
2023-11-29 17:43 ` [PATCH 6/7] iommu/dma: Centralise iommu_setup_dma_ops() Robin Murphy
2023-11-29 17:43   ` Robin Murphy
2023-11-29 20:50   ` Jason Gunthorpe
2023-11-29 20:50     ` Jason Gunthorpe
2023-11-29 17:43 ` [PATCH 7/7] dma-mapping: Simplify arch_setup_dma_ops() Robin Murphy
2023-11-29 17:43   ` Robin Murphy
2023-11-30  5:23   ` kernel test robot
2023-12-04  8:44   ` Christoph Hellwig
2023-12-04  8:44     ` Christoph Hellwig
2023-12-04 12:54     ` Robin Murphy
2023-12-04 12:54       ` Robin Murphy
2023-11-29 20:36 ` [PATCH 0/7] dma-mapping: Clean up arch_setup_dma_ops() Jason Gunthorpe
2023-11-29 20:36   ` Jason Gunthorpe
2023-12-01 13:07   ` Robin Murphy
2023-12-01 13:07     ` Robin Murphy
2023-12-01 13:57     ` Jason Gunthorpe
2023-12-01 13:57       ` Jason Gunthorpe

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.