Commit 6fba14a7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull dmaengine fixes from Vinod Koul:

 - Revert pl330 issue_pending waits until WFP state due to regression
   reported in Bluetooth loading

 - Xilinx driver fixes for synchronization, buffer offsets, locking and
   kdoc

 - idxd fixes for spinlock and preventing the migration of the perf
   context to an invalid target

 - idma driver fix for interrupt handling when powered off

 - Tegra driver residual calculation fix

 - Owl driver register access fix

* tag 'dmaengine-fix-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine:
  dmaengine: idxd: Fix oops during rmmod on single-CPU platforms
  dmaengine: xilinx: xdma: Clarify kdoc in XDMA driver
  dmaengine: xilinx: xdma: Fix synchronization issue
  dmaengine: xilinx: xdma: Fix wrong offsets in the buffers addresses in dma descriptor
  dma: xilinx_dpdma: Fix locking
  dmaengine: idxd: Convert spinlock to mutex to lock evl workqueue
  idma64: Don't try to serve interrupts when device is powered off
  dmaengine: tegra186: Fix residual calculation
  dmaengine: owl: fix register access functions
  dmaengine: Revert "dmaengine: pl330: issue_pending waits until WFP state"
parents 63407d30 f221033f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -171,6 +171,10 @@ static irqreturn_t idma64_irq(int irq, void *dev)
	u32 status_err;
	unsigned short i;

	/* Since IRQ may be shared, check if DMA controller is powered on */
	if (status == GENMASK(31, 0))
		return IRQ_NONE;

	dev_vdbg(idma64->dma.dev, "%s: status=%#x\n", __func__, status);

	/* Check if we have any interrupt from the DMA controller */
+2 −3
Original line number Diff line number Diff line
@@ -342,7 +342,7 @@ static void idxd_cdev_evl_drain_pasid(struct idxd_wq *wq, u32 pasid)
	if (!evl)
		return;

	spin_lock(&evl->lock);
	mutex_lock(&evl->lock);
	status.bits = ioread64(idxd->reg_base + IDXD_EVLSTATUS_OFFSET);
	t = status.tail;
	h = status.head;
@@ -354,9 +354,8 @@ static void idxd_cdev_evl_drain_pasid(struct idxd_wq *wq, u32 pasid)
			set_bit(h, evl->bmap);
		h = (h + 1) % size;
	}
	spin_unlock(&evl->lock);

	drain_workqueue(wq->wq);
	mutex_unlock(&evl->lock);
}

static int idxd_cdev_release(struct inode *node, struct file *filep)
+2 −2
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ static int debugfs_evl_show(struct seq_file *s, void *d)
	if (!evl || !evl->log)
		return 0;

	spin_lock(&evl->lock);
	mutex_lock(&evl->lock);

	evl_status.bits = ioread64(idxd->reg_base + IDXD_EVLSTATUS_OFFSET);
	t = evl_status.tail;
@@ -87,7 +87,7 @@ static int debugfs_evl_show(struct seq_file *s, void *d)
		dump_event_entry(idxd, s, i, &count, processed);
	}

	spin_unlock(&evl->lock);
	mutex_unlock(&evl->lock);
	return 0;
}

+4 −4
Original line number Diff line number Diff line
@@ -775,7 +775,7 @@ static int idxd_device_evl_setup(struct idxd_device *idxd)
		goto err_alloc;
	}

	spin_lock(&evl->lock);
	mutex_lock(&evl->lock);
	evl->log = addr;
	evl->dma = dma_addr;
	evl->log_size = size;
@@ -796,7 +796,7 @@ static int idxd_device_evl_setup(struct idxd_device *idxd)
	gencfg.evl_en = 1;
	iowrite32(gencfg.bits, idxd->reg_base + IDXD_GENCFG_OFFSET);

	spin_unlock(&evl->lock);
	mutex_unlock(&evl->lock);
	return 0;

err_alloc:
@@ -819,7 +819,7 @@ static void idxd_device_evl_free(struct idxd_device *idxd)
	if (!gencfg.evl_en)
		return;

	spin_lock(&evl->lock);
	mutex_lock(&evl->lock);
	gencfg.evl_en = 0;
	iowrite32(gencfg.bits, idxd->reg_base + IDXD_GENCFG_OFFSET);

@@ -836,7 +836,7 @@ static void idxd_device_evl_free(struct idxd_device *idxd)
	evl_dma = evl->dma;
	evl->log = NULL;
	evl->size = IDXD_EVL_SIZE_MIN;
	spin_unlock(&evl->lock);
	mutex_unlock(&evl->lock);

	dma_free_coherent(dev, evl_log_size, evl_log, evl_dma);
}
+1 −1
Original line number Diff line number Diff line
@@ -293,7 +293,7 @@ struct idxd_driver_data {

struct idxd_evl {
	/* Lock to protect event log access. */
	spinlock_t lock;
	struct mutex lock;
	void *log;
	dma_addr_t dma;
	/* Total size of event log = number of entries * entry size. */
Loading