[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aF6T9-iUWMVx4DyK@infradead.org>
Date: Fri, 27 Jun 2025 05:52:07 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Petr Tesarik <ptesarik@...e.com>
Cc: Marek Szyprowski <m.szyprowski@...sung.com>, Robin@....codeaurora.org,
Bagas Sanjaya <bagasdotme@...il.com>,
Jonathan Corbet <corbet@....net>,
Andrew Morton <akpm@...ux-foundation.org>,
Leon Romanovsky <leon@...nel.org>, Keith Busch <kbusch@...nel.org>,
Caleb Sander Mateos <csander@...estorage.com>,
Sagi Grimberg <sagi@...mberg.me>, Jens Axboe <axboe@...nel.dk>,
John Garry <john.g.garry@...cle.com>,
"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
"open list:MEMORY MANAGEMENT" <linux-mm@...ck.org>,
iommu@...ts.linux.dev
Subject: Re: [PATCH 7/8] docs: dma-api: update streaming DMA API physical
address constraints
On Thu, Jun 26, 2025 at 07:06:02AM +0200, Petr Tesarik wrote:
> @Marek, @Robin Do you agree that device drivers should not be concerned
> about the physical address of a buffer passed to the streaming DMA API?
>
> I mean, are there any real-world systems with:
> * some RAM that is not DMA-addressable,
> * no IOMMU,
> * CONFIG_SWIOTLB is not set?
>
> FWIW if _I_ received a bug report that a device driver fails to submit
> I/O on such a system, I would politely explain the reporter that their
> kernel is misconfigured, and they should enable CONFIG_SWIOTLB.
Modulo the case of < 32-bit (or 31-bit for some systems) case the
general idea was that the iommu API always works except for temporary
resource shortages. Now if you configure without SWIOTLB on system
that would otherwise need it you gotta keep the pieces. That's why
I've always argued against making that (and ZONE_DMA) user selectable,
but some arch maintainers insisted that they want that, breaking the
original guarantee. Which is annoying as dma_map_* can't tell you
if the failure is permanent or transient.
Powered by blists - more mailing lists