]> git.baikalelectronics.ru Git - kernel.git/commit
sparc64/pci_sun4v: fix ATU checks for large DMA masks
authorChristoph Hellwig <hch@lst.de>
Wed, 3 Apr 2019 19:34:34 +0000 (21:34 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 10 Apr 2019 19:42:04 +0000 (21:42 +0200)
commitd2e943e098b2e3fa2fbc887f634949afd255146c
tree621a4c367696e9ddd877e037a867cf689207ff1f
parent71ed5bcfd45ab35e5abdfc66d15f941b2df98047
sparc64/pci_sun4v: fix ATU checks for large DMA masks

Now that we allow drivers to always need to set larger than required
DMA masks we need to be a little more careful in the sun4v PCI iommu
driver to chose when to select the ATU support - a larger DMA mask
can be set even when the platform does not support ATU, so we always
have to check if it is avaiable before using it.  Add a little helper
for that and use it in all the places where we make ATU usage decisions
based on the DMA mask.

Fixes: 795d7a52628c ("sparc64/pci_sun4v: allow large DMA masks")
Reported-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Meelis Roos <mroos@linux.ee>
Acked-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/pci_sun4v.c