Skip to content

Commit 7ca6d1c

Browse files
committed
Merge tag 'powerpc-7.0-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fix from Madhavan Srinivasan: - fix iommu incorrectly bypassing DMA APIs Thanks to Dan Horak, Gaurav Batra, and Ritesh Harjani (IBM). * tag 'powerpc-7.0-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/powernv/iommu: iommu incorrectly bypass DMA APIs
2 parents 3719114 + 328335a commit 7ca6d1c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/powerpc/kernel/dma-iommu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ bool arch_dma_unmap_sg_direct(struct device *dev, struct scatterlist *sg,
6767
}
6868
bool arch_dma_alloc_direct(struct device *dev)
6969
{
70-
if (dev->dma_ops_bypass)
70+
if (dev->dma_ops_bypass && dev->bus_dma_limit)
7171
return true;
7272

7373
return false;
7474
}
7575

7676
bool arch_dma_free_direct(struct device *dev, dma_addr_t dma_handle)
7777
{
78-
if (!dev->dma_ops_bypass)
78+
if (!dev->dma_ops_bypass || !dev->bus_dma_limit)
7979
return false;
8080

8181
return is_direct_handle(dev, dma_handle);

0 commit comments

Comments
 (0)