]> git.baikalelectronics.ru Git - kernel.git/commit
s390/pci: add s390_iommu_aperture kernel parameter
authorNiklas Schnelle <schnelle@linux.ibm.com>
Tue, 14 Sep 2021 07:26:49 +0000 (09:26 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 26 Oct 2021 13:21:30 +0000 (15:21 +0200)
commit1200af65397a5d09e7ad6da949ac280cc6fc6e10
tree139ed883c6e7d3936e959e07ea7e1e47269fd4c2
parent0caf6f4a9f8f0658f14086d36020909a3c3d4dd6
s390/pci: add s390_iommu_aperture kernel parameter

Some applications map the same memory area for DMA multiple times while
also mapping significant amounts of memory. With our current DMA code
these applications will run out of DMA addresses after mapping half of
the available memory because the number of DMA mappings is constrained
by the number of concurrently active DMA addresses we support which in
turn is limited by the minimum of hardware constraints and high_memory.

Limiting the number of active DMA addresses to high_memory is only
a heuristic to save memory used by the iommu_bitmap and DMA page tables
however. This was added under the assumption that it rarely makes sense
to DMA map more than system memory.

To accommodate special applications which insist on double mapping, which
works on other platforms, allow specifying a factor of how many times
installed memory is available as DMA address space. Use 0 as a special
value to apply no constraints beyond what hardware dictates at the
expense of significantly more memory use.

Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Documentation/admin-guide/kernel-parameters.txt
arch/s390/pci/pci_dma.c