From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: "Z.q. Hou" <zhiqiang.hou@nxp.com>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"bhelgaas@google.com" <bhelgaas@google.com>,
"jingoohan1@gmail.com" <jingoohan1@gmail.com>,
"gustavo.pimentel@synopsys.com" <gustavo.pimentel@synopsys.com>,
Roy Zang <roy.zang@nxp.com>, Mingkai Hu <mingkai.hu@nxp.com>,
"M.h. Lian" <minghuan.lian@nxp.com>
Subject: Re: [PATCHv2 2/4] PCI: dwc: fix 4GiB outbound window size truncated to zero issue
Date: Wed, 5 Dec 2018 16:01:53 +0000 [thread overview]
Message-ID: <20181205160153.GA18567@e107981-ln.cambridge.arm.com> (raw)
In-Reply-To: <20181107100854.28389-3-Zhiqiang.Hou@nxp.com>
On Wed, Nov 07, 2018 at 10:09:10AM +0000, Z.q. Hou wrote:
> From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
>
> 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 <Zhiqiang.Hou@nxp.com>
> Acked-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
> ---
> 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 ?
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
>
next prev parent reply other threads:[~2018-12-05 16:02 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-07 10:08 [PATCHv2 0/4] PCI: dwc: add prefetchable memory range support Z.q. Hou
2018-11-07 10:09 ` [PATCHv2 1/4] PCI: dwc: fix potential memory leak Z.q. Hou
2018-12-05 15:40 ` Lorenzo Pieralisi
2018-12-06 1:08 ` Z.q. Hou
2018-11-07 10:09 ` [PATCHv2 2/4] PCI: dwc: fix 4GiB outbound window size truncated to zero issue Z.q. Hou
2018-12-05 16:01 ` Lorenzo Pieralisi [this message]
2018-12-06 1:25 ` Z.q. Hou
2018-12-11 14:40 ` Lorenzo Pieralisi
2018-11-07 10:09 ` [PATCHv2 3/4] PCI: layerscape: initialize the number of viewport Z.q. Hou
2018-11-22 11:16 ` Lorenzo Pieralisi
2018-11-23 6:01 ` Z.q. Hou
2018-11-07 10:09 ` [PATCHv2 4/4] PCI: dwc: add prefetchable memory range support Z.q. Hou
2018-11-21 17:36 ` Gustavo Pimentel
2018-11-22 1:03 ` Z.q. Hou
2018-11-28 17:59 ` Lorenzo Pieralisi
2018-12-11 10:21 ` Z.q. Hou
2018-12-11 15:19 ` Lorenzo Pieralisi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181205160153.GA18567@e107981-ln.cambridge.arm.com \
--to=lorenzo.pieralisi@arm.com \
--cc=bhelgaas@google.com \
--cc=gustavo.pimentel@synopsys.com \
--cc=jingoohan1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=minghuan.lian@nxp.com \
--cc=mingkai.hu@nxp.com \
--cc=roy.zang@nxp.com \
--cc=zhiqiang.hou@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox