Commit 944e15f2 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'dma-mapping-7.0-2026-02-26' of...

Merge tag 'dma-mapping-7.0-2026-02-26' of git://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux

Pull dma-mapping fixes from Marek Szyprowski:
 "Two DMA-mapping fixes for the recently merged API rework (Jiri Pirko
  and Stian Halseth)"

* tag 'dma-mapping-7.0-2026-02-26' of git://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux:
  sparc: Fix page alignment in dma mapping
  dma-mapping: avoid random addr value print out on error path
parents e094883b d5b5e814
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -312,6 +312,8 @@ static dma_addr_t dma_4u_map_phys(struct device *dev, phys_addr_t phys,
	if (direction != DMA_TO_DEVICE)
		iopte_protection |= IOPTE_WRITE;

	phys &= IO_PAGE_MASK;

	for (i = 0; i < npages; i++, base++, phys += IO_PAGE_SIZE)
		iopte_val(*base) = iopte_protection | phys;

+2 −0
Original line number Diff line number Diff line
@@ -410,6 +410,8 @@ static dma_addr_t dma_4v_map_phys(struct device *dev, phys_addr_t phys,

	iommu_batch_start(dev, prot, entry);

	phys &= IO_PAGE_MASK;

	for (i = 0; i < npages; i++, phys += IO_PAGE_SIZE) {
		long err = iommu_batch_add(phys, mask);
		if (unlikely(err < 0L))
+1 −1
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ static inline dma_addr_t dma_direct_map_phys(struct device *dev,

	if (is_swiotlb_force_bounce(dev)) {
		if (attrs & DMA_ATTR_MMIO)
			goto err_overflow;
			return DMA_MAPPING_ERROR;

		return swiotlb_map(dev, phys, size, dir, attrs);
	}