Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3204738imu; Sat, 24 Nov 2018 00:03:37 -0800 (PST) X-Google-Smtp-Source: AFSGD/VNrxEmq5iTdhTX2Ws67VkYGpDLQgsRELnTua0Xd56S2Ij3nW0Byk2aBtiN5WJh0Fo/HeHd X-Received: by 2002:a65:60c2:: with SMTP id r2mr14253533pgv.393.1543046617467; Sat, 24 Nov 2018 00:03:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543046617; cv=none; d=google.com; s=arc-20160816; b=Admcr7Nl1IJTA9uP94Nsr3RO0k6vW2AW48tBPNx0lWVkkdJ24T3z8B1qlAHk4jbOHb s/qB1mXD+wYuY0npRa1sil4yRa6trE7yNia8CVdPmKgM2qywtVGBFxrNXwxms40lwzwk /KaUA1wfKb+nOnTdOswKdcd1K8t/+NwVsKYwrrHchFCcoI0YwBWgIF+jslPX/wj0nUES ixGfV0pAGlHEFMTifqXIrTFEiLlq72tu8aL6azPUjVSUI87q5I4jgX5ntBjxrKF9TCRI ECzB3z1rKgj8YDkDBjsswAm0Dmbf8d/eQHGL5abEPxibCK0m71u3IcX/CsUEH+mly3to 4KUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=GEIyZFSUFSRQi8l+3WaMF3kUBOL1GFeWHKV48TAi9tU=; b=DzzSNkfC0kbq8nly/mMZZtQkVw5jF4N7WT5wWxg28G/6+xqkZ8cmCMMk8fkGS30cLH LdSFZKX/mjcQLIpvrrzvlISm/zFE7SQi6x5Yl8qki3H0RB5tks1/cokRzVw4w6Sm3Xuw R4NUrrKOWn1jPtBB5qD1pSs+KNJF5iG976yJJQsNGH3/03nAYLcxMWJ3irxoF1/zmtXN H6lLs9zM3VkBJZJNViQQ39EyST/W8A0Eqr//pVBJu66Oc9Uh9t9qX5hDSYWyayrg8JCd 2E01owoljgXXhdUIUDy1NirVszCYRRAVyqHfRs/X80oMYghiMKLXxF39+r068SnmljPT GCvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g10si24014020plq.371.2018.11.24.00.03.22; Sat, 24 Nov 2018 00:03:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2502194AbeKWRkS (ORCPT + 99 others); Fri, 23 Nov 2018 12:40:18 -0500 Received: from verein.lst.de ([213.95.11.211]:34683 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733170AbeKWRkR (ORCPT ); Fri, 23 Nov 2018 12:40:17 -0500 Received: by newverein.lst.de (Postfix, from userid 2407) id 120BC68BC7; Fri, 23 Nov 2018 07:57:21 +0100 (CET) Date: Fri, 23 Nov 2018 07:57:20 +0100 From: Christoph Hellwig To: Russell King - ARM Linux Cc: Linus Torvalds , robin.murphy@arm.com, linux-arch@vger.kernel.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org, joro@8bytes.org, the arch/x86 maintainers , Linux List Kernel Mailing , iommu@lists.linux-foundation.org, linux-alpha@vger.kernel.org, xen-devel@lists.xenproject.org, jdmason@kudzu.us, David Woodhouse , Christoph Hellwig , linux-arm-kernel@lists.infradead.org, m.szyprowski@samsung.com Subject: Re: remove the ->mapping_error method from dma_map_ops V2 Message-ID: <20181123065720.GB17856@lst.de> References: <20181122140320.24080-1-hch@lst.de> <20181122170715.GI30658@n2100.armlinux.org.uk> <11829e3c-7302-f821-cf5c-863e5267a17b@arm.com> <20181122180526.GL30658@n2100.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181122180526.GL30658@n2100.armlinux.org.uk> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 22, 2018 at 06:05:26PM +0000, Russell King - ARM Linux wrote: > An alternative idea would be to migrate away from the > dma_map_single() and dma_map_page() interfaces that return a > dma_addr_t, and instead have them return an error code or zero > on success. See here for a proposal: https://lists.linuxfoundation.org/pipermail/iommu/2018-November/030912.html That is just the attr variants, but that would be a start. Dave didn't particularly like it, though. > note the simpler unmap API, which inherently guarantees that the > parameters to the map could be carried over to the unmap - without > our many driver authors having to think about it. The problem is that we can often derive some or all parameters from field already inherent in the upper layer or hardware interface. So for these cases your version would bloat the required data structures.