Merge branch 'for-linus' into fixes
authorVinod Koul <vkoul@kernel.org>
Wed, 5 Aug 2020 13:32:07 +0000 (19:02 +0530)
committerVinod Koul <vkoul@kernel.org>
Wed, 5 Aug 2020 13:32:07 +0000 (19:02 +0530)
Signed-off-by: Vinod Koul <vkoul@kernel.org>
 Conflicts:
drivers/dma/idxd/sysfs.c

12 files changed:
1  2 
drivers/dma/dmatest.c
drivers/dma/dw/core.c
drivers/dma/idxd/cdev.c
drivers/dma/idxd/device.c
drivers/dma/idxd/idxd.h
drivers/dma/idxd/irq.c
drivers/dma/idxd/sysfs.c
drivers/dma/imx-sdma.c
drivers/dma/ioat/dma.c
drivers/dma/ti/k3-udma-private.c
drivers/dma/ti/k3-udma.c
include/uapi/linux/idxd.h

Simple merge
Simple merge
index cb376cf6a2d2c3316967dc74dc8e09e84ef6fb5e,f9fc589662073ac8ed6c28142098a830b2ce4eae..c3976156db2fc0d90fb96399b327414c7a121b77
@@@ -115,10 -104,11 +115,13 @@@ static int idxd_cdev_release(struct ino
        dev_dbg(dev, "%s called\n", __func__);
        filep->private_data = NULL;
  
+       /* Wait for in-flight operations to complete. */
+       idxd_wq_drain(wq);
        kfree(ctx);
 +      mutex_lock(&wq->wq_lock);
        idxd_wq_put(wq);
 +      mutex_unlock(&wq->wq_lock);
        return 0;
  }
  
Simple merge
index 908c8d0ef3ab6f41c159f0ab22b6fd8f180da467,5f50bb830ca4ef255b3e35ff3916e9fb90bc8146..e62b4799d1896e932e0e59b7450008e2d808ebf6
@@@ -288,9 -290,9 +290,10 @@@ int idxd_wq_alloc_resources(struct idxd
  void idxd_wq_free_resources(struct idxd_wq *wq);
  int idxd_wq_enable(struct idxd_wq *wq);
  int idxd_wq_disable(struct idxd_wq *wq);
+ void idxd_wq_drain(struct idxd_wq *wq);
  int idxd_wq_map_portal(struct idxd_wq *wq);
  void idxd_wq_unmap_portal(struct idxd_wq *wq);
 +void idxd_wq_disable_cleanup(struct idxd_wq *wq);
  
  /* submission */
  int idxd_submit_desc(struct idxd_wq *wq, struct idxd_desc *desc);
index 8a35f58da689092b8555aac1426b88a0ae02a637,f3c1d9ae8b5638052da4579131b699c9180f3f5e..b5142556cc4e8648867d0d8162e1f835916801d3
@@@ -158,11 -155,10 +155,11 @@@ irqreturn_t idxd_misc_thread(int vec, v
                                "idxd halted, need %s.\n",
                                gensts.reset_type == IDXD_DEVICE_RESET_FLR ?
                                "FLR" : "system reset");
+                       spin_unlock_bh(&idxd->dev_lock);
                }
-               spin_unlock_bh(&idxd->dev_lock);
        }
  
 + out:
        idxd_unmask_msix_vector(idxd, irq_entry->id);
        return IRQ_HANDLED;
  }
index 2e2c5082f3220cb4616ac6f218deb0e61a4e1080,6f0711a822a1243cc943c3950a55b578fbbb50b2..dcba60953217332c0243e49cadeae5fffb88b756
@@@ -313,14 -303,7 +303,14 @@@ static int idxd_config_bus_remove(struc
                }
  
                idxd_unregister_dma_device(idxd);
-               spin_lock_irqsave(&idxd->dev_lock, flags);
                rc = idxd_device_disable(idxd);
-               spin_unlock_irqrestore(&idxd->dev_lock, flags);
 +              for (i = 0; i < idxd->max_wqs; i++) {
 +                      struct idxd_wq *wq = &idxd->wqs[i];
 +
++                      mutex_lock(&wq->wq_lock);
 +                      idxd_wq_disable_cleanup(wq);
++                      mutex_unlock(&wq->wq_lock);
 +              }
                module_put(THIS_MODULE);
                if (rc < 0)
                        dev_warn(dev, "Device disable failed\n");
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge