Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp695426pxb; Thu, 9 Sep 2021 09:53:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwx0KuyrrCUP/rxhn2US50KBeqPV/HjVVWf9xSk5VD4iz5PAF3OWaQ4m+yU6sv3sgme0K7G X-Received: by 2002:a05:6402:1e90:: with SMTP id f16mr4199430edf.136.1631206432359; Thu, 09 Sep 2021 09:53:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631206432; cv=none; d=google.com; s=arc-20160816; b=WEWQWdZZ+Pt8/8PL7qwXkf9zQ6t6pqLPSPHQcDWs2Hzdl9FOKH6ByDnwhrsTvvNY5Z uVk5VgUymz8HiWJzXZOjFWTJ+jKsueLhXr2mOvcW8izVTnAepKIiEofdJG7jRmxJolmI IHH/KGIo8KkHeSQxoTFsaz64v3EwHkUw/5TQaZ39QdQV7AQ3V4cFMa55YJAOTbxTOUP9 VcbOHwiI79UBLDNVfyVAfDgg4/GI9fOykX6mxJuvM8X9HFoqUupUYLjcCBxzk4JgdhZX S+kzz6HXQdwDbFrtb3HrT4ZTDjpA6C7eAsQe4EkLHhaoODf7acxaWxFkbE66oOulodsm WWGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:dkim-signature; bh=YtcxtM2RbgTic/9NhzdoONL1C+9xeRtzN770QHck5PY=; b=iliwLqusdHWeATEG5+eNN+02v0aACMTRtH632hcqaso7hdT692C9NZZ3buDfw2ejAX QyvcHknkhMSXg2ehSMRNUX+KtCS6/hmT8JPZTudpPwUhE6An/BsSklHg7ithTd/jAmf7 65X2mVzO6A3OOHZb1YopZ0VzlL/+kxrgyffsGqeLdMKEqgUNPcu4/hMCzqI1MYZPr7PG v9Lo3v8hgjud6a9MokBg2y19baTSp384OXmy1xMdqUGlLGf/6QOI0HEKXmKZdELdczqb BGBPFVvKkm7JoizVZfn1wj+MqTX9ZVIJJu4j4FPVjoza7lmTwCKEYXF8QcB8mhzdoQhQ Y3/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=Gq6aTGAg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deltatee.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w18si2396154edc.532.2021.09.09.09.53.27; Thu, 09 Sep 2021 09:53:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=Gq6aTGAg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=deltatee.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239011AbhIIQw3 (ORCPT + 99 others); Thu, 9 Sep 2021 12:52:29 -0400 Received: from ale.deltatee.com ([204.191.154.188]:53188 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240038AbhIIQwY (ORCPT ); Thu, 9 Sep 2021 12:52:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=deltatee.com; s=20200525; h=Subject:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:content-disposition; bh=YtcxtM2RbgTic/9NhzdoONL1C+9xeRtzN770QHck5PY=; b=Gq6aTGAg4XeCQAHjIOeJU6/6Ss OUPL9qiZpS2odtm4q2meLIjIpvpj+gS0x7STykqChPo+osVFbChNL2F01ETE5W4MO5CFmJoMjsNOT wbymCOHB9bqma2wTIyyQWO9nUtTzNJ0jSXQqHe0Ae+rmNHBmvRzc+d9oUvRgl392F3FO23KM5RQpw X2dC6OOz/Qutclae9csQYT01pAb7FU1aHIhrpWGxQF28FzXGsSmkndnk+q+pRg3gOJgHbT//lC/pf GDUw6rGYcdrbFqj2A7uOOwRpv06OcWFSG+qGPyrM9DEJnukPpRPcPI8k/e2RTOQda4lU64NhHaWaC 4am0y9Fw==; Received: from s0106a84e3fe8c3f3.cg.shawcable.net ([24.64.144.200] helo=[192.168.0.10]) by ale.deltatee.com with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mONGX-0006AA-Jj; Thu, 09 Sep 2021 10:51:11 -0600 To: Wang Lu , bhelgaas@google.com Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210909032528.24517-1-wanglu@dapustor.com> From: Logan Gunthorpe Message-ID: <8e3b718c-1a74-232c-0e4c-9cc76d3ae1ac@deltatee.com> Date: Thu, 9 Sep 2021 10:51:07 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210909032528.24517-1-wanglu@dapustor.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 24.64.144.200 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, bhelgaas@google.com, wanglu@dapustor.com X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, NICE_REPLY_A,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [PATCH] PCI/P2PDMA: fix the wrong dma address calculation when map sg X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-09-08 9:25 p.m., Wang Lu wrote: > The bus offset is bus address - physical address, > so the calculation in __pci_p2pdma_map_sg should be: > bus address = physical address + bus offset. > > Signed-off-by: Wang Lu Thanks, yes I believe my math was wrong here. It was never tested on any machine that has a non-zero bus-offset. Reviewed-by: Logan Gunthorpe