Skip to content

Commit 2187582

Browse files
niklas88Vasily Gorbik
authored andcommitted
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>
1 parent 5078775 commit 2187582

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/s390/pci/pci_dma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ static int __init dma_alloc_cpu_table_caches(void)
666666

667667
int __init zpci_dma_init(void)
668668
{
669-
s390_iommu_aperture = (u64)high_memory;
669+
s390_iommu_aperture = (u64)virt_to_phys(high_memory);
670670
if (!s390_iommu_aperture_factor)
671671
s390_iommu_aperture = ULONG_MAX;
672672
else

0 commit comments

Comments
 (0)