From: Chris Leech <cleech@redhat.com>
To: Nilesh Javali <njavali@marvell.com>
Cc: martin.petersen@oracle.com, lduncan@suse.com,
linux-scsi@vger.kernel.org,
GR-QLogic-Storage-Upstream@marvell.com, jmeneghi@redhat.com
Subject: Re: [PATCH v3 1/3] uio: introduce UIO_MEM_DMA_COHERENT type
Date: Wed, 24 Jan 2024 15:36:39 -0800 [thread overview]
Message-ID: <ZbGfB2tqASg5Jiaq@rhel-developer-toolbox-latest> (raw)
In-Reply-To: <20240109121458.26475-2-njavali@marvell.com>
Nilesh,
On Tue, Jan 09, 2024 at 05:44:56PM +0530, Nilesh Javali wrote:
> + ret = dma_mmap_coherent(&idev->dev,
> + vma,
> + addr,
> + mem->dma_addr,
> + vma->vm_end - vma->vm_start);
When I asked about the use of idev->dev here in the v2 posting, you
repled as follows.
> While the cnic loads, it registers the cnic_uio_dev->pdev->dev with
> uio and the uio attaches its device to cnic device as it's parent. So
> uio and cnic are attached to the same PCI device.
I still don't think the sysfs parent relationship is enough to get the
correct behavior out of the DMA APIs on all platforms, and
dma_mmap_coherent needs to be using the same device struct as
dma_alloc_coherent.
I had some testing done on an AMD system, where your v2 patch set was
failing with the iommu enabled, and my original changes were reported to
work. And I believe these v3 patches are functionally the same.
- Chris
next prev parent reply other threads:[~2024-01-24 23:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-09 12:14 [PATCH v3 0/3] UIO_MEM_DMA_COHERENT for cnic/bnx2/bnx2x Nilesh Javali
2024-01-09 12:14 ` [PATCH v3 1/3] uio: introduce UIO_MEM_DMA_COHERENT type Nilesh Javali
2024-01-24 23:14 ` Chris Leech
2024-01-25 22:43 ` Greg Kroah-Hartman
2024-01-24 23:36 ` Chris Leech [this message]
2024-01-25 10:49 ` [EXT] " Nilesh Javali
2024-01-25 19:16 ` Chris Leech
2024-01-09 12:14 ` [PATCH v3 2/3] cnic,bnx2,bnx2x: use UIO_MEM_DMA_COHERENT Nilesh Javali
2024-01-09 12:14 ` [PATCH v3 3/3] cnic,bnx2,bnx2x: page align uio mmap allocations Nilesh Javali
2024-01-17 7:59 ` [PATCH v3 0/3] UIO_MEM_DMA_COHERENT for cnic/bnx2/bnx2x Nilesh Javali
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZbGfB2tqASg5Jiaq@rhel-developer-toolbox-latest \
--to=cleech@redhat.com \
--cc=GR-QLogic-Storage-Upstream@marvell.com \
--cc=jmeneghi@redhat.com \
--cc=lduncan@suse.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=njavali@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox