From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Date: Thu, 29 Nov 2018 18:31:32 +0000 Subject: Re: remove the ->mapping_error method from dma_map_ops V2 Message-Id: <20181129183132.GA30281@lst.de> List-Id: References: <20181123065511.GA17856@lst.de> <20181128074117.GA21126@lst.de> <20181128174545.GJ30658@n2100.armlinux.org.uk> <20181128180841.GM30658@n2100.armlinux.org.uk> <20181129162323.GA27068@lst.de> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Linus Torvalds Cc: Christoph Hellwig , Russell King - ARM Linux , linux-arch@vger.kernel.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org, robin.murphy@arm.com, the arch/x86 maintainers , Linux List Kernel Mailing , iommu@lists.linux-foundation.org, linux-alpha@vger.kernel.org, xen-devel@lists.xenproject.org, David Woodhouse , linux-arm-kernel@lists.infradead.org On Thu, Nov 29, 2018 at 09:44:05AM -0800, Linus Torvalds wrote: > No. Really. If there's no iotlb, then you just mark that one page > reserved. It simply doesn't get used. It doesn't mean you suddenly > need a swiotlb. Sure, we could just skip that page entirely based on dma_to_phys. > But whatever. It's independent from the patch series under discussion. > Make dma_mapping_error() at least return a real error (eg -EINVAL, or > whatever is the common error), and we can maybe do this later. Ok, I'll do that. > Or, better yet, plan on removing the single-page dma mappign entirely > at a later date, and make the issue moot. What would be the replacement? Build a S/G list for every single page mapping? Not sure that would create a lot of happy campers..