]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Merge tag 'dma-mapping-7.2-2026-06-16' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 17 Jun 2026 19:20:21 +0000 (12:20 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 17 Jun 2026 19:20:21 +0000 (12:20 -0700)
Pull dma-mapping updates from Marek Szyprowski:

 - added checks for DMA attributes in the debug code, especially to
   ensure that mappings are created and released with matching
   attributes (Leon Romanovsky)

 - better default configuration for CMA on NUMA machines (Feng Tang)

 - code cleanup in dma benchmark tool (Rosen Penev)

* tag 'dma-mapping-7.2-2026-06-16' of git://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux:
  dma: map_benchmark: turn dma_sg_map_param buf into a flexible array
  dma-contiguous: simplify numa cma area handling
  dma-contiguous: add kconfig option to setup numa cma area if not configured explicitly
  dma-debug: Ensure mappings are created and released with matching attributes
  dma-debug: Feed DMA attribute for unmapping flows too
  dma-debug: Record DMA attributes in debug entry
  dma-debug: Remove unused DMA attribute parameter
  ntb: Use consistent DMA attributes when freeing DMA mappings
  ntb: Store original DMA address for future release

1  2 
Documentation/admin-guide/kernel-parameters.txt
kernel/dma/debug.c
kernel/dma/mapping.c

index 2c0e2cd89b5ed7453434e27d4d218a334b866cdf,c38efc1ac8d6cde71ddfe3692fb4c0ec86ccf7ad..026d50de340e2ba81ded290acb821460b5e3d2df
@@@ -1250,15 -1280,9 +1280,16 @@@ void debug_dma_map_phys(struct device *
        entry->size      = size;
        entry->direction = direction;
        entry->map_err_type = MAP_ERR_NOT_CHECKED;
+       entry->attrs     = attrs;
  
 -      if (!(attrs & DMA_ATTR_MMIO)) {
 +      if (attrs & DMA_ATTR_MMIO) {
 +              unsigned long pfn = PHYS_PFN(phys);
 +
 +              if (pfn_valid(pfn) && !PageReserved(pfn_to_page(pfn)))
 +                      err_printk(dev, entry,
 +                                 "dma_map_resource called for RAM address %pa\n",
 +                                 &phys);
 +      } else {
                check_for_stack(dev, phys);
  
                if (!PhysHighMem(phys))
Simple merge