public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia•com>
To: Christophe Leroy <christophe.leroy@csgroup•eu>
Cc: Leon Romanovsky <leon@kernel•org>,
	Marek Szyprowski <m.szyprowski@samsung•com>,
	Leon Romanovsky <leonro@nvidia•com>,
	Andreas Larsson <andreas@gaisler•com>,
	Borislav Petkov <bp@alien8•de>,
	Dave Hansen <dave.hansen@linux•intel.com>,
	"David S. Miller" <davem@davemloft•net>,
	Geoff Levand <geoff@infradead•org>, Helge Deller <deller@gmx•de>,
	Ingo Molnar <mingo@redhat•com>,
	iommu@lists•linux.dev,
	"James E.J. Bottomley" <James.Bottomley@hansenpartnership•com>,
	Jason Wang <jasowang@redhat•com>, Juergen Gross <jgross@suse•com>,
	linux-alpha@vger•kernel.org, linux-kernel@vger•kernel.org,
	linux-mips@vger•kernel.org, linux-parisc@vger•kernel.org,
	linuxppc-dev@lists•ozlabs.org,
	Madhavan Srinivasan <maddy@linux•ibm.com>,
	Matt Turner <mattst88@gmail•com>,
	Michael Ellerman <mpe@ellerman•id.au>,
	"Michael S. Tsirkin" <mst@redhat•com>,
	Richard Henderson <richard.henderson@linaro•org>,
	sparclinux@vger•kernel.org,
	Stefano Stabellini <sstabellini@kernel•org>,
	Thomas Bogendoerfer <tsbogend@alpha•franken.de>,
	Thomas Gleixner <tglx@linutronix•de>,
	virtualization@lists•linux.dev, x86@kernel•org,
	xen-devel@lists•xenproject.org,
	Magnus Lindholm <linmag7@gmail•com>
Subject: Re: [PATCH v1 4/9] powerpc: Convert to physical address DMA mapping
Date: Sat, 4 Oct 2025 17:02:04 -0300	[thread overview]
Message-ID: <20251004200204.GK3360665@nvidia.com> (raw)
In-Reply-To: <909c5ab3-b3d3-4b5b-bc64-8b30c220ac92@csgroup.eu>

On Sat, Oct 04, 2025 at 08:19:40AM +0200, Christophe Leroy wrote:
> 
> 
> Le 03/10/2025 à 18:35, Jason Gunthorpe a écrit :
> > On Sun, Sep 28, 2025 at 06:02:24PM +0300, Leon Romanovsky wrote:
> > > From: Leon Romanovsky <leonro@nvidia•com>
> > > 
> > > Adapt PowerPC DMA to use physical addresses in order to prepare code
> > > to removal .map_page and .unmap_page.
> > > 
> > > Signed-off-by: Leon Romanovsky <leonro@nvidia•com>
> > > ---
> > >   arch/powerpc/include/asm/iommu.h         |  8 +++---
> > >   arch/powerpc/kernel/dma-iommu.c          | 22 +++++++---------
> > >   arch/powerpc/kernel/iommu.c              | 14 +++++-----
> > >   arch/powerpc/platforms/ps3/system-bus.c  | 33 ++++++++++++++----------
> > >   arch/powerpc/platforms/pseries/ibmebus.c | 15 ++++++-----
> > >   arch/powerpc/platforms/pseries/vio.c     | 21 ++++++++-------
> > >   6 files changed, 60 insertions(+), 53 deletions(-)
> > 
> > I think this is good enough for PPC anything more looks quite hard
> 
> Can you tell what you have in mind ? What more would be interesting to do
> but looks hard ? Maybe it can be a follow-up change ?

The phys_addr_t should be pushed down through the ops function pointer
and only the implementations that need the vaddr should call
virt_to_phys()

Ie try to avoid doing phys -> virt -> phys as it is not efficient.

Jason


  reply	other threads:[~2025-10-04 20:02 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-28 15:02 [PATCH v1 0/9] Remove DMA .map_page and .unmap_page callbacks Leon Romanovsky
2025-09-28 15:02 ` [PATCH v1 1/9] alpha: Convert mapping routine to rely on physical address Leon Romanovsky
2025-09-28 17:35   ` Magnus Lindholm
2025-10-03 14:47   ` Jason Gunthorpe
2025-09-28 15:02 ` [PATCH v1 2/9] MIPS/jazzdma: Provide physical address directly Leon Romanovsky
2025-10-03 14:48   ` Jason Gunthorpe
2025-09-28 15:02 ` [PATCH v1 3/9] parisc: Convert DMA map_page to map_phys interface Leon Romanovsky
2025-10-03 15:01   ` Jason Gunthorpe
2025-10-03 17:18     ` John David Anglin
2025-10-03 17:26       ` Jason Gunthorpe
2025-10-03 20:28         ` John David Anglin
2025-10-05 14:29       ` James Bottomley
2025-10-05 13:22     ` Leon Romanovsky
2025-10-05 23:31       ` Jason Gunthorpe
2025-10-06  4:03         ` Leon Romanovsky
2025-10-05 14:22     ` James Bottomley
2025-09-28 15:02 ` [PATCH v1 4/9] powerpc: Convert to physical address DMA mapping Leon Romanovsky
2025-10-03 16:35   ` Jason Gunthorpe
2025-10-04  6:19     ` Christophe Leroy
2025-10-04 20:02       ` Jason Gunthorpe [this message]
2025-09-28 15:02 ` [PATCH v1 5/9] sparc64: Use " Leon Romanovsky
2025-10-03 15:16   ` Jason Gunthorpe
2025-09-28 15:02 ` [PATCH v1 6/9] x86: Use physical address for " Leon Romanovsky
2025-10-03 15:16   ` Jason Gunthorpe
2025-09-28 15:02 ` [PATCH v1 7/9] vdpa: Convert to physical address " Leon Romanovsky
2025-10-03 15:58   ` Jason Gunthorpe
2025-09-28 15:02 ` [PATCH v1 8/9] xen: swiotlb: Convert mapping routine to rely on physical address Leon Romanovsky
2025-10-03 16:18   ` Jason Gunthorpe
2025-09-28 15:02 ` [PATCH v1 9/9] dma-mapping: remove unused map_page callback Leon Romanovsky
2025-09-28 15:17   ` Sam Ravnborg
2025-09-28 15:20     ` Sam Ravnborg
2025-09-28 15:31       ` Leon Romanovsky
2025-09-28 15:28     ` Leon Romanovsky
2025-10-03 16:18   ` Jason Gunthorpe

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=20251004200204.GK3360665@nvidia.com \
    --to=jgg@nvidia$(echo .)com \
    --cc=James.Bottomley@hansenpartnership$(echo .)com \
    --cc=andreas@gaisler$(echo .)com \
    --cc=bp@alien8$(echo .)de \
    --cc=christophe.leroy@csgroup$(echo .)eu \
    --cc=dave.hansen@linux$(echo .)intel.com \
    --cc=davem@davemloft$(echo .)net \
    --cc=deller@gmx$(echo .)de \
    --cc=geoff@infradead$(echo .)org \
    --cc=iommu@lists$(echo .)linux.dev \
    --cc=jasowang@redhat$(echo .)com \
    --cc=jgross@suse$(echo .)com \
    --cc=leon@kernel$(echo .)org \
    --cc=leonro@nvidia$(echo .)com \
    --cc=linmag7@gmail$(echo .)com \
    --cc=linux-alpha@vger$(echo .)kernel.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-mips@vger$(echo .)kernel.org \
    --cc=linux-parisc@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=m.szyprowski@samsung$(echo .)com \
    --cc=maddy@linux$(echo .)ibm.com \
    --cc=mattst88@gmail$(echo .)com \
    --cc=mingo@redhat$(echo .)com \
    --cc=mpe@ellerman$(echo .)id.au \
    --cc=mst@redhat$(echo .)com \
    --cc=richard.henderson@linaro$(echo .)org \
    --cc=sparclinux@vger$(echo .)kernel.org \
    --cc=sstabellini@kernel$(echo .)org \
    --cc=tglx@linutronix$(echo .)de \
    --cc=tsbogend@alpha$(echo .)franken.de \
    --cc=virtualization@lists$(echo .)linux.dev \
    --cc=x86@kernel$(echo .)org \
    --cc=xen-devel@lists$(echo .)xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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