s390/pci: Use dma-iommu layer
authorNiklas Schnelle <schnelle@linux.ibm.com>
Thu, 28 Sep 2023 14:31:37 +0000 (16:31 +0200)
committerJoerg Roedel <jroedel@suse.de>
Mon, 2 Oct 2023 06:43:00 +0000 (08:43 +0200)
commitc76c067e488ccd55734c3e750799caf2c5956db6
treec4489302a1c2a119afcba4b54535cb4d8c65cbee
parentb6f888709a155b4e748aded93afc9fa43aaa28dd
s390/pci: Use dma-iommu layer

While s390 already has a standard IOMMU driver and previous changes have
added I/O TLB flushing operations this driver is currently only used for
user-space PCI access such as vfio-pci. For the DMA API s390 instead
utilizes its own implementation in arch/s390/pci/pci_dma.c which drives
the same hardware and shares some code but requires a complex and
fragile hand over between DMA API and IOMMU API use of a device and
despite code sharing still leads to significant duplication and
maintenance effort. Let's utilize the common code DMAP API
implementation from drivers/iommu/dma-iommu.c instead allowing us to
get rid of arch/s390/pci/pci_dma.c.

Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Link: https://lore.kernel.org/r/20230928-dma_iommu-v13-3-9e5fc4dacc36@linux.ibm.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
13 files changed:
Documentation/admin-guide/kernel-parameters.txt
arch/s390/include/asm/pci.h
arch/s390/include/asm/pci_clp.h
arch/s390/include/asm/pci_dma.h
arch/s390/pci/Makefile
arch/s390/pci/pci.c
arch/s390/pci/pci_bus.c
arch/s390/pci/pci_debug.c
arch/s390/pci/pci_dma.c [deleted file]
arch/s390/pci/pci_event.c
arch/s390/pci/pci_sysfs.c
drivers/iommu/Kconfig
drivers/iommu/s390-iommu.c