Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp747581imu; Tue, 11 Dec 2018 07:01:33 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vs7HwmDO8R5YhlKvOESf+eAeWwCW0mYcemnj2U/2n2IWFQQf2ME60Oe3+iuuBZU0UedQQ3 X-Received: by 2002:aa7:85d7:: with SMTP id z23mr17299299pfn.205.1544540493579; Tue, 11 Dec 2018 07:01:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544540493; cv=none; d=google.com; s=arc-20160816; b=buAVNGjhtg3FOXWiuLiwipaEjYfTV5DknpkqEXSuL54ScvYfIO+pQjOZnZj379Y/DO ASZfT70CGxoAJc7riJqfW8yc8EH0MoXBYtAbPdxI72osMzLrTEWpX0vurTe7b0pknXzs MDqN9H5nGV+DgE1l+SBwwpZepMP7dswo9WpZlqZQYoN9K8rPvDpPXVbD5lOiyBm9qWBj NZI5CnSKYs1pbuTDNzbbc13kyaZKruSjYGA1I+VSWnicwNooLiVXpiwyjVdNhA4k9Bgb hO5wVE6X9NVBujU0OxPbG3LWA4ozCqcwygE12v5uJ72ZbncneUI1jfABF8GjxG7pj6W/ 3Fgg== 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=NGovjgL9GIGZYcwp3uel7WedB017SffjIdLdnj/X+uY=; b=f2NeZ0iu+k38PFwxCOWGx4PQLOIDPJHT7WkRBmxIOofH9oPSYISvbiPEgt14XZ7e2T ciooAak+4bMiLt01gXEE7WPG44Qjf+olMttPNCQUbGRwUA2q19XSj8gD/Fg+YPlTwi78 0apXiC+sN3/QyGn/7UWUwTws4rkHGrR8uLD0jhk7qJh7MOu/aQ5eZA+3e04LriqcFLIr t6lAtRiVFgQJ8QlwBL7siwRgz1CcMsigimLDfQ5F47fMxEyr5Uye5rSOSqD3Grm/yfzV rPEbjMjk6rtbNSZ3QgQaAD2UV5usKte8dm+Sn48owST84aphnHaKRUWOasOzr1sj6oih ocvA== 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 b14si12219082pgj.20.2018.12.11.07.01.18; Tue, 11 Dec 2018 07:01:33 -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 S1726669AbeLKOlE (ORCPT + 99 others); Tue, 11 Dec 2018 09:41:04 -0500 Received: from foss.arm.com ([217.140.101.70]:48672 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726231AbeLKOlE (ORCPT ); Tue, 11 Dec 2018 09:41:04 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A9B9A1596; Tue, 11 Dec 2018 06:41:03 -0800 (PST) Received: from e107981-ln.cambridge.arm.com (e107981-ln.cambridge.arm.com [10.1.197.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0B6563F575; Tue, 11 Dec 2018 06:41:01 -0800 (PST) Date: Tue, 11 Dec 2018 14:40:59 +0000 From: Lorenzo Pieralisi To: "Z.q. Hou" Cc: "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "bhelgaas@google.com" , "jingoohan1@gmail.com" , "gustavo.pimentel@synopsys.com" , Roy Zang , Mingkai Hu , "M.h. Lian" Subject: Re: [PATCHv2 2/4] PCI: dwc: fix 4GiB outbound window size truncated to zero issue Message-ID: <20181211144059.GB526@e107981-ln.cambridge.arm.com> References: <20181107100854.28389-1-Zhiqiang.Hou@nxp.com> <20181107100854.28389-3-Zhiqiang.Hou@nxp.com> <20181205160153.GA18567@e107981-ln.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 06, 2018 at 01:25:17AM +0000, Z.q. Hou wrote: > Hi Lorenzo, > > Thanks a lot for your comments! > > > -----Original Message----- > > From: Lorenzo Pieralisi > > Sent: 2018??12??6?? 0:02 > > To: Z.q. Hou > > Cc: linux-pci@vger.kernel.org; linux-kernel@vger.kernel.org; > > bhelgaas@google.com; jingoohan1@gmail.com; > > gustavo.pimentel@synopsys.com; Roy Zang ; Mingkai Hu > > ; M.h. Lian > > Subject: Re: [PATCHv2 2/4] PCI: dwc: fix 4GiB outbound window size > > truncated to zero issue > > > > On Wed, Nov 07, 2018 at 10:09:10AM +0000, Z.q. Hou wrote: > > > From: Hou Zhiqiang > > > > > > The current type of mem_size is 'u32', so when resource_size() return > > > 4G it will be truncated to zero. This patch fix it by changing its > > > type to 'u64'. > > > > > > Signed-off-by: Hou Zhiqiang > > > Acked-by: Gustavo Pimentel > > > --- > > > V2: > > > - Reworded the subject. > > > > > > drivers/pci/controller/dwc/pcie-designware.c | 4 ++-- > > > drivers/pci/controller/dwc/pcie-designware.h | 4 ++-- > > > 2 files changed, 4 insertions(+), 4 deletions(-) > > > > I would like to add a Fixes: tag. > > > > is > > > > edd45e396829 ("PCI: dwc: designware: Move _unroll configurations to a > > separate function") > > > > the commit you are fixing ? > > Yes, will add the Fixes, and I think it fixes the original patch: 340cba6092c2 ("pci: Add PCIe driver for Samsung Exynos"). I will add it myself. Thanks, Lorenzo > > Thanks, > > Lorenzo > > > > > diff --git a/drivers/pci/controller/dwc/pcie-designware.c > > > b/drivers/pci/controller/dwc/pcie-designware.c > > > index 2153956a0b20..7ac5989c23ef 100644 > > > --- a/drivers/pci/controller/dwc/pcie-designware.c > > > +++ b/drivers/pci/controller/dwc/pcie-designware.c > > > @@ -106,7 +106,7 @@ static void dw_pcie_writel_ob_unroll(struct > > > dw_pcie *pci, u32 index, u32 reg, > > > > > > static void dw_pcie_prog_outbound_atu_unroll(struct dw_pcie *pci, int > > index, > > > int type, u64 cpu_addr, > > > - u64 pci_addr, u32 size) > > > + u64 pci_addr, u64 size) > > > { > > > u32 retries, val; > > > > > > @@ -141,7 +141,7 @@ static void > > > dw_pcie_prog_outbound_atu_unroll(struct dw_pcie *pci, int index, } > > > > > > void dw_pcie_prog_outbound_atu(struct dw_pcie *pci, int index, int type, > > > - u64 cpu_addr, u64 pci_addr, u32 size) > > > + u64 cpu_addr, u64 pci_addr, u64 size) > > > { > > > u32 retries, val; > > > > > > diff --git a/drivers/pci/controller/dwc/pcie-designware.h > > > b/drivers/pci/controller/dwc/pcie-designware.h > > > index 9f1a5e399b70..a438c3879aa9 100644 > > > --- a/drivers/pci/controller/dwc/pcie-designware.h > > > +++ b/drivers/pci/controller/dwc/pcie-designware.h > > > @@ -153,7 +153,7 @@ struct pcie_port { > > > u32 io_size; > > > u64 mem_base; > > > phys_addr_t mem_bus_addr; > > > - u32 mem_size; > > > + u64 mem_size; > > > struct resource *cfg; > > > struct resource *io; > > > struct resource *mem; > > > @@ -238,7 +238,7 @@ int dw_pcie_link_up(struct dw_pcie *pci); int > > > dw_pcie_wait_for_link(struct dw_pcie *pci); void > > > dw_pcie_prog_outbound_atu(struct dw_pcie *pci, int index, > > > int type, u64 cpu_addr, u64 pci_addr, > > > - u32 size); > > > + u64 size); > > > int dw_pcie_prog_inbound_atu(struct dw_pcie *pci, int index, int bar, > > > u64 cpu_addr, enum dw_pcie_as_type as_type); void > > > dw_pcie_disable_atu(struct dw_pcie *pci, int index, > > > -- > > > 2.17.1 > > > > > Thanks, > Zhiqiang