Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3153647imu; Fri, 23 Nov 2018 22:51:07 -0800 (PST) X-Google-Smtp-Source: AFSGD/WILW3ki6BLYYJ3mdjdwsL1lCbuxzHzExOdx/vzE1Z4OM3M7w5ql2TDoUywC4QWSyjSKuW1 X-Received: by 2002:a17:902:103:: with SMTP id 3-v6mr17326353plb.87.1543042267377; Fri, 23 Nov 2018 22:51:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543042267; cv=none; d=google.com; s=arc-20160816; b=EUhAU9+pMZpvrYWiBH7qcAySMblJelY7A+1bEuk/RMh1X8IauS/5hS0FTOBZgvKmV6 ql6pH4u7WU79YuFHaABLXltOyqnjvp5+jxtzHH4imyPaYNWOLC4VnxbR6bLKK8lNEvAS NAnZdJvfGa57TqIl3ZpDuvqeihElIrygeZRREOOY4qcxhtp1s76xTNWwc2aiHqS2aaCG kOoRFROs8e0TtKotqZ4PjMOqSWoC572uLaO5eLC51uH17okVWGu4XKSfgsL+88qGPrA+ buBLsbho5HTm9aiNC3rmKAFTDFHe6lftKGjX6KF0PSIJQc+RZqmmHCnqSlxlWYQHelMQ umlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=e562HhA2flT6fTyLAvxV3SOYh8Ynz+eq8zTy+B4XCBo=; b=IW3djJx/p6OS9ugkeanHOG/D9J2CGAG1Z544fVFaY9yeRY3J+o1vpCyZlpI5cncyJO u3xeYkru1NRshJYzUzSspsNaqF7gCGCVRTLgi9iOhIkEMkJbshRWTWOt8Q6X7mVgOSaj fWfHY3GK3+xYV0Mlttjp2W7HN+vTqsCr34sgtlO1I8uoAHRXLTaFMYYEBgPBXo9SRdib p4HDQarLORzQV3D64FbxR9cr12WqrTsT7GKYClj+XKTYmL3NWiO9W+ZSpAoeW3MXDLGN vALyheixuSgglEDGxpVCHujWq9Aofm41Y/zMj3Gd7Zp/NnjS4AGAxxIpH2c1ZlS0s5ie hvdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="fFLdH/fA"; 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 k134si55276581pga.401.2018.11.23.22.50.52; Fri, 23 Nov 2018 22:51:07 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b="fFLdH/fA"; 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 S2406015AbeKWDbU (ORCPT + 99 others); Thu, 22 Nov 2018 22:31:20 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:33193 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732870AbeKWDbU (ORCPT ); Thu, 22 Nov 2018 22:31:20 -0500 Received: by mail-lj1-f196.google.com with SMTP id v1-v6so8524226ljd.0 for ; Thu, 22 Nov 2018 08:51:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=e562HhA2flT6fTyLAvxV3SOYh8Ynz+eq8zTy+B4XCBo=; b=fFLdH/fArJodPzBcL/riDZt8I8jJRKO5OTA2wYlDGTSL/IN1W/LlKJCXcPi1UZXmRv pk4iVZGuDq14GcO/8fgeKYOsPQw+C+viw101r+YOZQ3OQFF9njL+ZtIucWKEtWpBN+1e HeB0H6QQoTAIqrtq8SlsKP2n9UAcAUiaQO2sI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=e562HhA2flT6fTyLAvxV3SOYh8Ynz+eq8zTy+B4XCBo=; b=Zl3haYs0P2OzQFaRy5/UPIXMp7CqJb6/WrJPIgXeyelD5ik2Y9m4cJeWIjKLhwH5y4 Io70lq5u+AJQqMKiir/i+GqFcptSWiLCoKYChcOxJfFBpv0b4JnAjVmnyGhRITCLU4A3 AU4tF102xq1WHAA0OVs6Sya5BMNzpfEBqnVv53fBDpyT++EbEnIlg2maZIi1WVNyf2aA HTUazMCp5HJSEUiAgx1czFnV2v5Iez9iH2ltnLfBe7zcExR1wfNZSUBW/KxF960xcva7 WDT3c4RF1R/hYDU/V1A17k3GbbSDxz1MztqNXFQVhYkH77qCnXNAD3px/1uualPJVRLH R7EA== X-Gm-Message-State: AA+aEWZAXWWZ6MBKptL9IE/8VcivEOUOzdxA2D29UyIE8rJm/OBJZTK9 1pumUhJd90x0wzYnVy6GhYoDSLTuX8I1IQ== X-Received: by 2002:a2e:484:: with SMTP id a4-v6mr7436216ljf.27.1542905465841; Thu, 22 Nov 2018 08:51:05 -0800 (PST) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com. [209.85.208.180]) by smtp.gmail.com with ESMTPSA id o17sm7220243lff.77.2018.11.22.08.51.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Nov 2018 08:51:04 -0800 (PST) Received: by mail-lj1-f180.google.com with SMTP id v15-v6so8472611ljh.13 for ; Thu, 22 Nov 2018 08:51:04 -0800 (PST) X-Received: by 2002:a2e:2416:: with SMTP id k22-v6mr8344339ljk.80.1542905463649; Thu, 22 Nov 2018 08:51:03 -0800 (PST) MIME-Version: 1.0 References: <20181122140320.24080-1-hch@lst.de> In-Reply-To: <20181122140320.24080-1-hch@lst.de> From: Linus Torvalds Date: Thu, 22 Nov 2018 08:50:47 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: remove the ->mapping_error method from dma_map_ops V2 To: Christoph Hellwig Cc: iommu@lists.linux-foundation.org, jdmason@kudzu.us, joro@8bytes.org, David Woodhouse , m.szyprowski@samsung.com, robin.murphy@arm.com, "the arch/x86 maintainers" , linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org, xen-devel@lists.xenproject.org, linux-arch@vger.kernel.org, Linux List Kernel Mailing Content-Type: text/plain; charset="UTF-8" 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 6:03 AM Christoph Hellwig wrote: > > The 0 return doesn't work for direct mappings that have ram at address > zero and a lot of IOMMUs that start allocating bus space from address > zero, so we can't consolidate on that, but I think we can move everyone > to all-Fs, which the patch here does. Hmm. Maybe not limit it to just all ones, but actually use the (standard, for the kernel) IS_ERR_VALUE()? That basically reserves the last 4095 values in an unsigned long for error values. Then those functions could actually return *what* error they encountered, using just plain return -ENOMEM; or whatever? Linus