dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: "Bjorn Helgaas" <bhelgaas@google.com>,
	"Logan Gunthorpe" <logang@deltatee.com>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	"Christian König" <christian.koenig@amd.com>,
	"Sumit Semwal" <sumit.semwal@linaro.org>,
	linux-pci@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org
Subject: Re: [PATCH 1/2] PCI/P2PDMA: Update DMABUF lifecycle docs after move_notify() rename
Date: Fri, 4 Sep 2026 09:40:05 +0300	[thread overview]
Message-ID: <20260904064005.GE24140@unreal> (raw)
In-Reply-To: <20260903203431.GA2238823@bhelgaas>

On Thu, Sep 03, 2026 at 03:34:31PM -0500, Bjorn Helgaas wrote:
> On Tue, Aug 25, 2026 at 09:28:01AM +0300, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro@nvidia.com>
> > 
> > Commit 95308225e5ba ("dma-buf: Rename dma_buf_move_notify() to
> > dma_buf_invalidate_mappings()") left the DMABUF section of the P2PDMA
> > documentation pointing at move_notify(), a symbol that no longer
> > exists. Readers grepping for it find nothing, and this is the only
> > place in Documentation/ describing the revocation requirement.
> > 
> > Name the current function and record that importers which cannot unmap
> > within bounded time have to be rejected at attach time, which is what
> > makes the synchronous unmap on remove() achievable.
> > 
> > Fixes: 95308225e5ba ("dma-buf: Rename dma_buf_move_notify() to dma_buf_invalidate_mappings()")
> > Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> 
> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
> 
> It looks like 2/2 might be updated, and it probably makes sense to
> merge them both together, but let me know if you want me to take this.

This PCI patch is completely standalone, so I sent it separately:
https://lore.kernel.org/all/20260830-doc-p2p-move-v1-1-61a388620588@nvidia.com/

Can you please take it from there?

Thanks

> 
> > ---
> >  Documentation/driver-api/pci/p2pdma.rst | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/Documentation/driver-api/pci/p2pdma.rst b/Documentation/driver-api/pci/p2pdma.rst
> > index d3f406cca694..63cff9e4d2c9 100644
> > --- a/Documentation/driver-api/pci/p2pdma.rst
> > +++ b/Documentation/driver-api/pci/p2pdma.rst
> > @@ -167,9 +167,11 @@ In this case the initiator and target pci_devices are known and the P2P subsyste
> >  is used to determine the mapping type. The phys_addr_t-based DMA API is used to
> >  establish the dma_addr_t.
> >  
> > -Lifecycle is controlled by DMABUF move_notify(). When the exporting driver wants
> > +Lifecycle is controlled by DMABUF revocation. When the exporting driver wants
> >  to remove() it must deliver an invalidation shutdown to all DMABUF importing
> > -drivers through move_notify() and synchronously DMA unmap all the MMIO.
> > +drivers through dma_buf_invalidate_mappings() and synchronously DMA unmap all
> > +the MMIO. Importers unable to complete that unmap within bounded time have to
> > +be rejected when they attach, which dma_buf_attach_revocable() checks for.
> >  
> >  No importing driver can continue to have a DMA map to the MMIO after the
> >  exporting driver has destroyed its p2p_provider.
> > 
> > -- 
> > 2.55.0
> > 

  reply	other threads:[~2026-09-04  6:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-25  6:28 [PATCH 0/2] Document the DMA-buf mapping lifetime negotiation Leon Romanovsky
2026-08-25  6:28 ` [PATCH 1/2] PCI/P2PDMA: Update DMABUF lifecycle docs after move_notify() rename Leon Romanovsky
2026-08-25  6:29   ` sashiko-bot
2026-08-25 20:05   ` Logan Gunthorpe
2026-08-26 11:50   ` Christian König
2026-09-03 20:34   ` Bjorn Helgaas
2026-09-04  6:40     ` Leon Romanovsky [this message]
2026-08-25  6:28 ` [PATCH 2/2] dma-buf: Document how exporters and importers agree on mapping lifetime Leon Romanovsky
2026-08-25  6:31   ` sashiko-bot
2026-08-26 11:41   ` Christian König
2026-08-26 12:43     ` Leon Romanovsky
2026-08-26 13:06       ` Christian König
2026-08-26 14:02         ` Leon Romanovsky
2026-08-31  9:22           ` Christian König
2026-09-01 14:08             ` Jason Gunthorpe
2026-08-27 19:18   ` [Linaro-mm-sig] " Thomas Hellström
2026-08-30  7:58     ` Leon Romanovsky
2026-08-31  6:39       ` Thomas Hellström
2026-08-31  8:56       ` Christian König

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=20260904064005.GE24140@unreal \
    --to=leon@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=christian.koenig@amd.com \
    --cc=corbet@lwn.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=helgaas@kernel.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=logang@deltatee.com \
    --cc=skhan@linuxfoundation.org \
    --cc=sumit.semwal@linaro.org \
    /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