[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240201233400.3394996-4-cleech@redhat.com>
Date: Thu, 1 Feb 2024 15:33:59 -0800
From: Chris Leech <cleech@...hat.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Nilesh Javali <njavali@...vell.com>
Cc: Christoph Hellwig <hch@....de>,
John Meneghini <jmeneghi@...hat.com>,
Lee Duncan <lduncan@...e.com>,
Mike Christie <michael.christie@...cle.com>,
Hannes Reinecke <hare@...nel.org>,
netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-scsi@...r.kernel.org,
GR-QLogic-Storage-Upstream@...vell.com
Subject: [PATCH v5 3/4] uio_pruss: UIO_MEM_DMA_COHERENT conversion
Conversion of this driver to use UIO_MEM_DMA_COHERENT for
dma_alloc_coherent memory instead of UIO_MEM_PHYS.
Signed-off-by: Chris Leech <cleech@...hat.com>
---
drivers/uio/uio_pruss.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/uio/uio_pruss.c b/drivers/uio/uio_pruss.c
index 77e2dc4048855..72b33f7d4c40f 100644
--- a/drivers/uio/uio_pruss.c
+++ b/drivers/uio/uio_pruss.c
@@ -191,9 +191,11 @@ static int pruss_probe(struct platform_device *pdev)
p->mem[1].size = sram_pool_sz;
p->mem[1].memtype = UIO_MEM_PHYS;
- p->mem[2].addr = gdev->ddr_paddr;
+ p->mem[2].addr = (phys_addr_t) gdev->ddr_vaddr;
+ p->mem[2].dma_addr = gdev->ddr_paddr;
p->mem[2].size = extram_pool_sz;
- p->mem[2].memtype = UIO_MEM_PHYS;
+ p->mem[2].memtype = UIO_MEM_DMA_COHERENT;
+ p->mem[2].dma_device = dev;
p->name = devm_kasprintf(dev, GFP_KERNEL, "pruss_evt%d", cnt);
p->version = DRV_VERSION;
--
2.43.0
Powered by blists - more mailing lists