[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 4/9] powerpc: Convert to physical address DMA mapping
- To: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
- From: Jason Gunthorpe <jgg@xxxxxxxxxx>
- Date: Sat, 4 Oct 2025 17:02:04 -0300
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4ggoiRJiz2Tz/RE7CqNPZ9LXqpWAZN17aMszM2aHEb4=; b=MYVqB6xnUEl1ZpJbUO5LQX1ibif6TJEpOtxd536WJY2mn6+6tXJ9Wu7V8pxEXO+4GTDE5h/zbrGmyNpfgga6oBUEQHwllO+/0DN7Vjup/gTyvghv1cm8obDn0LiVL0bCzQ2n44xjx2vQOtP2fbCZyAX7+A2cyT7/kaaVZhNgkRK/AOtVqbDlvMT7Ah5uV9MvG61RFpSjlkgevHT4FI+yxrQML2CSJod+1rjI611QMq2MZMD5Qq0qx1rqaKmLANbpnyKsOiPWQmNnbPUFobM13IHYADGfGmLdt7yC/vdebP0nwK7TDT5aOSXOk2Lzp7h4ikOplFkqdADe62yfF7F1hA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=LhyKacLjUMDthF3K2Mi/orOdbBLNqjB7CKeHsCsMDIvTu/PZnfNPEOGWzpwb8enzuV5YPVS5JGFEYjMn5/NXyjJtEMVyDoIU5LC0dbk7E25qiSFpe7xHlclMVHo2DFAdh+7W/l5v/SrrwtCCFNLoI+KBv3NT5ZmWrO8aE+j9/Wdw/qhERMN2QceSgCIuv9O78wyvoXKsngSTTHODGD6Vtexzpdi3DaUODw2oh2bHtXIRtYKx98BhV7IDttLOm2uqeFFF3RNM/0x6Vrir7PTHiPy8ERGwtRqr48pG/XylqaRCzPM38VMs5EYbVbUHs/lU7aYcGenrfDm7WzeZeBM/8A==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com;
- Cc: Leon Romanovsky <leon@xxxxxxxxxx>, Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>, Leon Romanovsky <leonro@xxxxxxxxxx>, Andreas Larsson <andreas@xxxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Geoff Levand <geoff@xxxxxxxxxxxxx>, Helge Deller <deller@xxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, iommu@xxxxxxxxxxxxxxx, "James E.J. Bottomley" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>, Jason Wang <jasowang@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, linux-alpha@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, Madhavan Srinivasan <maddy@xxxxxxxxxxxxx>, Matt Turner <mattst88@xxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, "Michael S. Tsirkin" <mst@xxxxxxxxxx>, Richard Henderson <richard.henderson@xxxxxxxxxx>, sparclinux@xxxxxxxxxxxxxxx, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, virtualization@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, Magnus Lindholm <linmag7@xxxxxxxxx>
- Delivery-date: Sat, 04 Oct 2025 20:02:38 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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@xxxxxxxxxx>
> > >
> > > 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@xxxxxxxxxx>
> > > ---
> > > 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
|