Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'dma-mapping-6.18-2025-11-27' of git://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux

Pull dma-mapping fixes from Marek Szyprowski:
"Two last minute fixes for the recently modified DMA API infrastructure:

- proper handling of DMA_ATTR_MMIO in dma_iova_unlink() function (me)

- regression fix for the code refactoring related to P2PDMA (Pranjal
Shrivastava)"

* tag 'dma-mapping-6.18-2025-11-27' of git://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux:
dma-direct: Fix missing sg_dma_len assignment in P2PDMA bus mappings
iommu/dma: add missing support for DMA_ATTR_MMIO for dma_iova_unlink()

+4 -2
+3 -2
drivers/iommu/dma-iommu.c
··· 2008 2008 end - addr, iovad->granule - iova_start_pad); 2009 2009 2010 2010 if (!dev_is_dma_coherent(dev) && 2011 - !(attrs & DMA_ATTR_SKIP_CPU_SYNC)) 2011 + !(attrs & (DMA_ATTR_SKIP_CPU_SYNC | DMA_ATTR_MMIO))) 2012 2012 arch_sync_dma_for_cpu(phys, len, dir); 2013 2013 2014 2014 swiotlb_tbl_unmap_single(dev, phys, len, dir, attrs); ··· 2032 2032 size_t unmapped; 2033 2033 2034 2034 if ((state->__size & DMA_IOVA_USE_SWIOTLB) || 2035 - (!dev_is_dma_coherent(dev) && !(attrs & DMA_ATTR_SKIP_CPU_SYNC))) 2035 + (!dev_is_dma_coherent(dev) && 2036 + !(attrs & (DMA_ATTR_SKIP_CPU_SYNC | DMA_ATTR_MMIO)))) 2036 2037 iommu_dma_iova_unlink_range_slow(dev, addr, size, dir, attrs); 2037 2038 2038 2039 iommu_iotlb_gather_init(&iotlb_gather);
+1
kernel/dma/direct.c
··· 481 481 case PCI_P2PDMA_MAP_BUS_ADDR: 482 482 sg->dma_address = pci_p2pdma_bus_addr_map(&p2pdma_state, 483 483 sg_phys(sg)); 484 + sg_dma_len(sg) = sg->length; 484 485 sg_dma_mark_bus_address(sg); 485 486 continue; 486 487 default: