On Thu, 30 Sep 2021 13:44:54 +1000, Alexey Kardashevskiy wrote: > According to dma-api.rst, the dma_get_required_mask() helper should return > "the mask that the platform requires to operate efficiently". Which in > the case of PPC64 means the bypass mask and not a mask from an IOMMU table > which is shorter and slower to use due to map/unmap operations (especially > expensive on "pseries"). > > However the existing implementation ignores the possibility of bypassing > and returns the IOMMU table mask on the pseries platform which makes some > drivers (mpt3sas is one example) choose 32bit DMA even though bypass is > supported. The powernv platform sort of handles it by having a bigger > default window with a mask >=40 but it only works as drivers choose > 63/64bit if the required mask is >32 which is rather pointless. > > [...]
Applied to powerpc/fixes. [1/1] powerpc/iommu: Report the correct most efficient DMA mask for PCI devices https://git.kernel.org/powerpc/c/23c216b335d1fbd716076e8263b54a714ea3cf0e cheers