Received: by 10.192.165.148 with SMTP id m20csp3631164imm; Mon, 7 May 2018 16:04:10 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpaWUOWTjYhs2nKgXHfetkwOqBNPZhvxfpjgh5ZzrVZH3z/uBzHU2oa13Ov2lFOlyZTo4w2 X-Received: by 2002:a63:6dc8:: with SMTP id i191-v6mr30046051pgc.291.1525734250735; Mon, 07 May 2018 16:04:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525734250; cv=none; d=google.com; s=arc-20160816; b=YD77CB/QrDKye+xLBx9nnIDc25J2SUz4yPdz+fwDNd56uT0zgmf8s7D+8jc8gQC5Im QKQfutTrIeQpDeml2ImFxTci3uN4j9m4FJBNDZve53lYcBEUtT3jfXp+f/HL9dE3WZ87 Rn3cOu1hbYYFwW0CUQGemnF57DgJ8SEfUrc5g0wgQ8ab8V1LpfvR+Uic1GLt7efdyv/q MyZSLEaBYYqbRSwdqbHuyZOkU9DBzqLjqTKgDNdy8EMyFF1+u0wesfRrgpC9h1qTNw6j oXNtbGizRxifg5TY+AMOlVyOXlxk+cqeNUampUMNcIfFKXwxFomH6eq7bMG9UEUdmQDD cJdw== 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=k0KkDVvOvtJGv4n9Fh1Yy0lxOjrDkUQKSMRTfWHAJaA=; b=djUOyFFSEIbYDVsYDVvIS5KePfpzN4PwaMwdZWcJkRLjuQU1mj8DUyvwvKVA0gJxuv FJwUMTr5q3DH4gEJ7a5JvLFKL4w72SOEAQYJp3b4w9y4D9GSKmcne/2q8Un7Iedj6uUP qdSzecKYTC+4Gpa4QlwrhmGB4bWx1SfIn0vh6TmRul9zTbP1Ns64Csi5u4UXhMS6hojb T2+EOpcWwvCvpOI+f94Qf7NnbBBCZ3gKYzGMksODyxRM60xHP08VAircqNscfDi4tJlF 4g4AWGfympOM04U/h4LCUWyJuFmrpDQkknAS0OiI4dV5p2w4JBURiWWBYmktdftYAFQ9 G4XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NIohGw5K; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n30-v6si18931652pgc.231.2018.05.07.16.03.56; Mon, 07 May 2018 16:04:10 -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=pass header.i=@kernel.org header.s=default header.b=NIohGw5K; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753456AbeEGXCM (ORCPT + 99 others); Mon, 7 May 2018 19:02:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:52494 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753391AbeEGXCK (ORCPT ); Mon, 7 May 2018 19:02:10 -0400 Received: from localhost (unknown [69.71.5.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0C5F3214DA; Mon, 7 May 2018 23:02:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1525734130; bh=2mU6XhYJIiEonTpJDD5STWVyQKhIpiR8jcfhafa+OMs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NIohGw5Ko9xkKxnEauYA4oDHc0b5CFzSMTwZc427s8Qf+Lq6r5BHcc+uoNVHY8QAi 6JxR5PIk86WnbgrcoCLO4JPsu3jHZXnTYFjD7jCcJOiYwiklpShLmyz09dWc2GzLHc rL/hIqMG0cAA7usF7B4g0hymbvxXS3xvIVN91CeI= Date: Mon, 7 May 2018 18:02:08 -0500 From: Bjorn Helgaas To: Logan Gunthorpe Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org, linux-nvdimm@lists.01.org, linux-block@vger.kernel.org, Stephen Bates , Christoph Hellwig , Jens Axboe , Keith Busch , Sagi Grimberg , Bjorn Helgaas , Jason Gunthorpe , Max Gurtovoy , Dan Williams , =?iso-8859-1?B?Suly9G1l?= Glisse , Benjamin Herrenschmidt , Alex Williamson , Christian =?iso-8859-1?Q?K=F6nig?= Subject: Re: [PATCH v4 03/14] PCI/P2PDMA: Add PCI p2pmem dma mappings to adjust the bus offset Message-ID: <20180507230208.GF161390@bhelgaas-glaptop.roam.corp.google.com> References: <20180423233046.21476-1-logang@deltatee.com> <20180423233046.21476-4-logang@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180423233046.21476-4-logang@deltatee.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org s/dma/DMA/ (in subject) On Mon, Apr 23, 2018 at 05:30:35PM -0600, Logan Gunthorpe wrote: > The DMA address used when mapping PCI P2P memory must be the PCI bus > address. Thus, introduce pci_p2pmem_[un]map_sg() to map the correct > addresses when using P2P memory. > > For this, we assume that an SGL passed to these functions contain all > P2P memory or no P2P memory. > > Signed-off-by: Logan Gunthorpe