[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 3/9] parisc: Convert DMA map_page to map_phys interface
- To: Leon Romanovsky <leon@xxxxxxxxxx>
- From: Jason Gunthorpe <jgg@xxxxxxxxxx>
- Date: Fri, 3 Oct 2025 12:01:44 -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=fsuqmrBFlwfbzpdvfnwFd/qS1kt2Xi7ZRb0POdUc6Aw=; b=Zt85PuSEiep+n6tU8auKTaoj34VhSPLfq9p562ei29agtEI/Jb5J1mdIA19M+U2tzLqdVvyE4JyFWAtnuoxq6GGDqfnsAFz7LwbipWPEPQoDPS+I/39qExsglrrYcL/q9Hub2CwwL+vQnAW4rb+ogUUyvzwCWjk1WcAEG9DcFSr1OkpeFu2/KP03VEbA986meVgBW+Dk1BfMjTAJBBs7nUcwzp7w/KXp7PCxTjltUxyKZ8NNWu+8RFcS4SmIA4CpoueKZMF0P7LFRYaXvFI09ugz8fbRUQVDKDuQA2yl3ABgJkeT5xnOpblYbi6Np9f48nWDG72dBsbMQXVgR1DknQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Q2C7FAS80d/8xmmWNKvVsZc0PxzbQ91CN0hf8aVXmlwtRQAdskugRF42XxNc+9gVDzvBcLafJ5hkYIaZxuX6Wqahonz/tSjzLmZNUkJVndHfYNBxJ02DRwAr5DiiAMqK9PGteKtHX9xDPikk+vU75nsePrVj/Ao34zDuhJt5dhdCQYPRVLtqpZk7pdiAGckFPtKHNPfcBoxeC/3M5knpiFGVYAEYTixNoOPhNgw9tVg9iO/uVeH5FEY8zJ748hhfJSC92FtO+pF/VvOCRy8ytSbtFzEQ47i0aHou25Hw4WVkz237qnrF/GW6N8rfUbkVO+rsrQMBfK8jAaCve2ccAg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com;
- Cc: 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: Fri, 03 Oct 2025 15:02:04 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Sun, Sep 28, 2025 at 06:02:23PM +0300, Leon Romanovsky wrote:
> +ccio_map_phys(struct device *dev, phys_addr_t phys, size_t size,
> + enum dma_data_direction direction, unsigned long attrs)
> {
> - return ccio_map_single(dev, page_address(page) + offset, size,
> - direction);
> + if (attrs & DMA_ATTR_MMIO)
> + return DMA_MAPPING_ERROR;
> +
> + return ccio_map_single(dev, phys_to_virt(phys), size, direction);
This doesn't actually use the virt at all:
offset = ((unsigned long) addr) & ~IOVP_MASK;
if((size % L1_CACHE_BYTES) || ((unsigned long)addr % L1_CACHE_BYTES))
ccio_io_pdir_entry(pdir_start, KERNEL_SPACE, (unsigned
long)addr, hint);
And ccio_io_pdir_entry():
pa = lpa(vba);
Is a special instruction that uses virt but AI tells me that special
LPA instruction is returning phys. Not sure if that is a different
value than virt_to_phys()..
IDK, I'm not feeling brave enough to drop the LPA but maybe include
this note in the commit message.
Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
Jason
|