Merge branch 'stable/for-linus-5.13' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 4 May 2021 17:58:49 +0000 (10:58 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 4 May 2021 17:58:49 +0000 (10:58 -0700)
Pull swiotlb updates from Konrad Rzeszutek Wilk:
 "Christoph Hellwig has taken a cleaver and trimmed off the not-needed
  code and nicely folded duplicate code in the generic framework.

  This lays the groundwork for more work to add extra DMA-backend-ish in
  the future. Along with that some bug-fixes to make this a nice working
  package"

* 'stable/for-linus-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb:
  swiotlb: don't override user specified size in swiotlb_adjust_size
  swiotlb: Fix the type of index
  swiotlb: Make SWIOTLB_NO_FORCE perform no allocation
  ARM: Qualify enabling of swiotlb_init()
  swiotlb: remove swiotlb_nr_tbl
  swiotlb: dynamically allocate io_tlb_default_mem
  swiotlb: move global variables into a new io_tlb_mem structure
  xen-swiotlb: remove the unused size argument from xen_swiotlb_fixup
  xen-swiotlb: split xen_swiotlb_init
  swiotlb: lift the double initialization protection from xen-swiotlb
  xen-swiotlb: remove xen_io_tlb_start and xen_io_tlb_nslabs
  xen-swiotlb: remove xen_set_nslabs
  xen-swiotlb: use io_tlb_end in xen_swiotlb_dma_supported
  xen-swiotlb: use is_swiotlb_buffer in is_xen_swiotlb_buffer
  swiotlb: split swiotlb_tbl_sync_single
  swiotlb: move orig addr and size validation into swiotlb_bounce
  swiotlb: remove the alloc_size parameter to swiotlb_tbl_unmap_single
  powerpc/svm: stop using io_tlb_start

1  2 
arch/arm/mm/init.c
arch/arm/xen/mm.c
drivers/gpu/drm/i915/gem/i915_gem_internal.c
drivers/gpu/drm/nouveau/nouveau_ttm.c
drivers/iommu/dma-iommu.c
include/xen/swiotlb-xen.h

Simple merge
@@@ -150,9 -138,9 +150,9 @@@ int xen_swiotlb_detect(void
  static int __init xen_mm_init(void)
  {
        struct gnttab_cache_flush cflush;
 -      if (!xen_initial_domain())
 +      if (!xen_swiotlb_detect())
                return 0;
-       xen_swiotlb_init(1, false);
+       xen_swiotlb_init();
  
        cflush.op = 0;
        cflush.a.dev_bus_addr = 0;
@@@ -321,13 -321,13 +321,13 @@@ nouveau_ttm_init(struct nouveau_drm *dr
        }
  
  #if IS_ENABLED(CONFIG_SWIOTLB) && IS_ENABLED(CONFIG_X86)
-       need_swiotlb = !!swiotlb_nr_tbl();
+       need_swiotlb = is_swiotlb_active();
  #endif
  
 -      ret = ttm_bo_device_init(&drm->ttm.bdev, &nouveau_bo_driver,
 -                               drm->dev->dev, dev->anon_inode->i_mapping,
 -                               dev->vma_offset_manager, need_swiotlb,
 -                               drm->client.mmu.dmabits <= 32);
 +      ret = ttm_device_init(&drm->ttm.bdev, &nouveau_bo_driver, drm->dev->dev,
 +                                dev->anon_inode->i_mapping,
 +                                dev->vma_offset_manager, need_swiotlb,
 +                                drm->client.mmu.dmabits <= 32);
        if (ret) {
                NV_ERROR(drm, "error initialising bo driver, %d\n", ret);
                return ret;
Simple merge
Simple merge