Received: by 10.213.65.68 with SMTP id h4csp20646imn; Thu, 29 Mar 2018 23:35:06 -0700 (PDT) X-Google-Smtp-Source: AIpwx49I74r+MPR0lfLvHZh13p7JlNGWeLyecx6+cabaUioPlmqJ4GixrNGCHsA2gVRFoAYH44yq X-Received: by 2002:a17:902:8688:: with SMTP id g8-v6mr11807013plo.340.1522391706428; Thu, 29 Mar 2018 23:35:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522391706; cv=none; d=google.com; s=arc-20160816; b=nMwgkevqvK4vezslyQu/sYKTCHplxPnogobgsBTPdru+/QzUqUipeGtwlqsBjT4wQo phcFUAW5zFi6sNttlzgUpewVnwzObggqxyE+Ga2D2YGQ4yBVQfJVixQdxcTgr3FRWZjF zqFpqlILLW8/al8PhZvZ1JzxHHZWZFgsySaZ21loSzNECWbLty3StpJiL5F20KgaUCUn HzcB0jNg0by6sq+dAPk5eaePdRBIzVCfqV7RzIM1NG/qhSIA1AFLNW8JptWzqmqTjri2 vult3dK1Cn5ScocQt4d1YIVbY6i3CHN45V/pPxEi9sxL6gv5VLixWZ3cFz+sjh1kQrEo Ap3w== 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:dkim-signature:arc-authentication-results; bh=r5iC2fKPv1Ab+a0ZoyR7H8/2wpG74mR+eL1YTQCMawQ=; b=bXhuXxe1pZckEuSQzmIvCL/xH2vFY36psJLUD8PLCWepOQl8u3gAPkRFw4voFYK/Uw TN8Px7L5KOj050LdbFa0+djkcZSwcZyII+5dEb3nG+HPGIqqeDGS6A323KlAe7sI7Ket hid3PFr/aX0cly8obqTjqVWQEGG8DvM9Gua0A3L+ZA/yIfpuplZDsAAtf4eaeog6ZS3t 9L/9ECU+LBoGknl8bmMQnsCAtq1zv+anvmVfS9y8aqa6GkhiVCyn51iLS154FP3LU/j3 lqFpqgoiIdbpvQX1j8xC2RX7RFFLgUdIQaji+cHRrJMyNO7wnFo/VWBFhvc+Xo83v+D3 dk6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=TDt8UooA; 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 102-v6si7595579pla.230.2018.03.29.23.34.52; Thu, 29 Mar 2018 23:35:06 -0700 (PDT) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=TDt8UooA; 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 S1751243AbeC3Gdp (ORCPT + 99 others); Fri, 30 Mar 2018 02:33:45 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:34000 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750764AbeC3Gdn (ORCPT ); Fri, 30 Mar 2018 02:33:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=r5iC2fKPv1Ab+a0ZoyR7H8/2wpG74mR+eL1YTQCMawQ=; b=TDt8UooAhVEZkMHZ2lHZwtC/H 9qqASb4xJF4LZ35q0tMG1K3e5l4POhjyXBvvZGApel+RRMJM8c2Cj5nYdXTFJ4b3/bcdslH5jcj5R HYWFYrjiA8RNSgEiMwmm8A5AXY8MUE+/Lmrzp2HmO91rDdWOMEZCYOE1erLgA8amz9DkmMwsGd8cC IO4YfF5DzICzPDXr3uFocQ7xL+EX+kgLcJicg9NMzeqZiYRYyDOBMSO1PlttvUqR37fYxglnzVFVC tH7UHBmM90A819BeQnpNfIPc+tuuVEO96pfK98oadWh1yrOTOO0wpUnJx4gjxWB1KE8etdlY4BJU5 xvht44icg==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1f1nbS-0002Oj-7V; Fri, 30 Mar 2018 06:33:34 +0000 Date: Thu, 29 Mar 2018 23:33:34 -0700 From: Christoph Hellwig To: Jerome Glisse Cc: Logan Gunthorpe , Christian =?iso-8859-1?Q?K=F6nig?= , Christoph Hellwig , linaro-mm-sig@lists.linaro.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, Bjorn Helgaas Subject: Re: [PATCH 2/8] PCI: Add pci_find_common_upstream_dev() Message-ID: <20180330063334.GA8634@infradead.org> References: <16c7bef8-5f03-9e89-1f50-b62fb139a36f@deltatee.com> <6a5c9a10-50fe-b03d-dfc1-791d62d79f8e@amd.com> <73578b4e-664b-141c-3e1f-e1fae1e4db07@amd.com> <1b08c13e-b4a2-08f2-6194-93e6c21b7965@deltatee.com> <70adc2cc-f7aa-d4b9-7d7a-71f3ae99f16c@gmail.com> <98ce6cfd-bcf3-811e-a0f1-757b60da467a@deltatee.com> <8d050848-8970-b8c4-a657-429fefd31769@amd.com> <20180330015854.GA3572@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180330015854.GA3572@redhat.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 29, 2018 at 09:58:54PM -0400, Jerome Glisse wrote: > dma_map_resource() is the right API (thought its current implementation > is fill with x86 assumptions). So i would argue that arch can decide to > implement it or simply return dma error address which trigger fallback > path into the caller (at least for GPU drivers). SG variant can be added > on top. It isn't in general. It doesn't integrate with scatterlists (see my comment to page one), and it doesn't integrate with all the subsystems that also need a kernel virtual address.