s390/pci: convert high_memory to physical address
authorNiklas Schnelle <schnelle@linux.ibm.com>
Wed, 7 Sep 2022 09:38:30 +0000 (11:38 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Wed, 14 Sep 2022 14:46:00 +0000 (16:46 +0200)
commit2187582c361fcd33a6ab5e9e6fef5b774c3b8cda
tree416efbb4ecbc83199d7d54c594af12eea9ea17fb
parent50787755317ddf8c9bb3419a15b87c42237000cb
s390/pci: convert high_memory to physical address

We use high_memory as a measure for amount of memory available in
determining the required minimum size of our IOVA space with the
assumption that one rarely maps more than the available memory for DMA.
In special cases like mapping significant amounts of memory more than
once this can still be tuned with the s390_iommu_apterture kernel
parameter. In this use case high_memory is treated as a physical
address. As high_memory is a virtual address however this means we need
to convert it using virt_to_phys() before use

Note that at the moment physical and virtual addresses are identical so
this mismatch does not currently cause trouble.

Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/pci/pci_dma.c