Merge branch 'fixes' into next
authorVinod Koul <vkoul@kernel.org>
Wed, 5 Jan 2022 07:18:05 +0000 (12:48 +0530)
committerVinod Koul <vkoul@kernel.org>
Wed, 5 Jan 2022 07:18:05 +0000 (12:48 +0530)
We have a conflict in idxd driver between 'fixes' and 'next' and there
are patches dependent on this so, merge the 'fixes' branch into next

1  2 
drivers/dma/idxd/irq.c
drivers/dma/idxd/submit.c
drivers/dma/ti/k3-udma.c

Simple merge
index 569815a84e95bd2ceb451e8e399090970787d615,83452fbbb168b156ff75f481124198564c3c21d3..11ac06be1f0a46b00ba3d7a6e6567eecca4341ba
@@@ -120,32 -134,20 +125,43 @@@ static void llist_abort_desc(struct idx
        spin_unlock(&ie->list_lock);
  
        if (found)
 -              complete_desc(found, IDXD_COMPLETE_ABORT);
 +              idxd_dma_complete_txd(found, IDXD_COMPLETE_ABORT, false);
+       /*
 -       * complete_desc() will return desc to allocator and the desc can be
 -       * acquired by a different process and the desc->list can be modified.
 -       * Delete desc from list so the list trasversing does not get corrupted
 -       * by the other process.
++       * completing the descriptor will return desc to allocator and
++       * the desc can be acquired by a different process and the
++       * desc->list can be modified.  Delete desc from list so the
++       * list trasversing does not get corrupted by the other process.
+        */
+       list_for_each_entry_safe(d, t, &flist, list) {
+               list_del_init(&d->list);
 -              complete_desc(d, IDXD_COMPLETE_NORMAL);
++              idxd_dma_complete_txd(found, IDXD_COMPLETE_ABORT, true);
+       }
  }
  
 +/*
 + * ENQCMDS typically fail when the WQ is inactive or busy. On host submission, the driver
 + * has better control of number of descriptors being submitted to a shared wq by limiting
 + * the number of driver allocated descriptors to the wq size. However, when the swq is
 + * exported to a guest kernel, it may be shared with multiple guest kernels. This means
 + * the likelihood of getting busy returned on the swq when submitting goes significantly up.
 + * Having a tunable retry mechanism allows the driver to keep trying for a bit before giving
 + * up. The sysfs knob can be tuned by the system administrator.
 + */
 +int idxd_enqcmds(struct idxd_wq *wq, void __iomem *portal, const void *desc)
 +{
 +      int rc, retries = 0;
 +
 +      do {
 +              rc = enqcmds(portal, desc);
 +              if (rc == 0)
 +                      break;
 +              cpu_relax();
 +      } while (retries++ < wq->enqcmds_retries);
 +
 +      return rc;
 +}
 +
  int idxd_submit_desc(struct idxd_wq *wq, struct idxd_desc *desc)
  {
        struct idxd_device *idxd = wq->idxd;
Simple merge