linux/arch/s390/pci
Niklas Schnelle 568de506e3 s390/pci: use physical addresses in DMA tables
The entries in the DMA translation tables for our IOMMU must specify
physical addresses of either the next level table or the final page
to be mapped for DMA. Currently however the code simply passes the
virtual addresses of both. On the other hand we still need to walk the
tables via their virtual addresses so we need to do a phys_to_virt()
when setting the entries and a virt_to_phys() when getting them.
Similarly when passing the I/O translation anchor to the hardware we
must also specify its physical address.

As the DMA and IOMMU APIs we are implementing already use the correct
phys_addr_t type for the address to be mapped let's also thread this
through instead of treating it as just an unsigned long.

Note: this currently doesn't fix a real bug, since virtual addresses
are indentical to physical ones.

Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
2021-12-06 14:42:26 +01:00
..
Makefile s390/pci: consolidate SR-IOV specific code 2020-09-14 11:38:34 +02:00
pci_bus.c s390/pci: improve DMA translation init and exit 2021-08-25 11:03:34 +02:00
pci_bus.h s390/pci: fix use after free of zpci_dev 2021-08-18 10:12:42 +02:00
pci_clp.c s390/pci: read clp_list_pci_req only once 2021-09-07 13:38:42 +02:00
pci_debug.c locking/atomic, s390/pci: Remove redundant casts 2019-06-03 12:32:57 +02:00
pci_dma.c s390/pci: use physical addresses in DMA tables 2021-12-06 14:42:26 +01:00
pci_event.c s390/pci: implement minimal PCI error recovery 2021-11-08 14:17:49 +01:00
pci_insn.c s390/pci: refresh function handle in iomap 2021-11-08 14:17:49 +01:00
pci_iov.c s390/pci: add missing pci_iov.h include 2020-09-16 14:08:47 +02:00
pci_iov.h s390/pci: consolidate SR-IOV specific code 2020-09-14 11:38:34 +02:00
pci_irq.c s390/pci: use phys_to_virt() for AIBVs/DIBVs 2021-12-06 14:42:26 +01:00
pci_mmio.c s390/pci_mmio: fully validate the VMA before calling follow_pte() 2021-09-15 14:29:21 +02:00
pci_sysfs.c s390/pci: tolerate inconsistent handle in recover 2021-10-04 09:49:36 +02:00
pci.c s390/pci: use physical addresses in DMA tables 2021-12-06 14:42:26 +01:00