From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Enric Balletbo Serra <eballetbo@gmail.com>
Cc: Rob Herring <robh@kernel.org>,
Andrew Murray <andrew.murray@arm.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Heiko Stuebner <heiko@sntech.de>,
Karthikeyan Mitran <m.karthikeyan@mobiveil.co.in>,
linux-pci@vger.kernel.org, Shawn Lin <shawn.lin@rock-chips.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Toan Le <toan@os.amperecomputing.com>,
Will Deacon <will@kernel.org>, Ryder Lee <ryder.lee@mediatek.com>,
Michal Simek <michal.simek@xilinx.com>,
Christoph Hellwig <hch@infradead.org>,
"open list:ARM/Rockchip SoC..."
<linux-rockchip@lists.infradead.org>,
bcm-kernel-feedback-list@broadcom.com,
Linus Walleij <linus.walleij@linaro.org>,
Ray Jui <rjui@broadcom.com>, Hou Zhiqiang <Zhiqiang.Hou@nxp.com>,
Simon Horman <horms@verge.net.au>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@lists.infradead.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
Scott Branden <sbranden@broadcom.com>,
Jingoo Han <jingoohan1@gmail.com>,
rfi@lists.rocketboards.org, linux-renesas-soc@vger.kernel.org,
Tom Joseph <tjoseph@cadence.com>,
Srinath Mannam <srinath.mannam@broadcom.com>,
Gustavo Pimentel <gustavo.pimentel@synopsys.com>,
Ley Foon Tan <lftan@altera.com>
Subject: Re: [PATCH v3 10/25] PCI: rockchip: Use pci_parse_request_of_pci_ranges()
Date: Fri, 6 Dec 2019 14:09:01 +0000 [thread overview]
Message-ID: <20191206140901.GB26562@e121166-lin.cambridge.arm.com> (raw)
In-Reply-To: <CAFqH_51-BMWSGGBpoKxA3UK+yPHSpPgok5i=daSC0KS5oc5ueA@mail.gmail.com>
On Thu, Dec 05, 2019 at 06:56:01PM +0100, Enric Balletbo Serra wrote:
> Hi Rob,
>
> Missatge de Rob Herring <robh@kernel.org> del dia dl., 28 d’oct. 2019
> a les 17:38:
> >
> > Convert the Rockchip host bridge to use the common
> > pci_parse_request_of_pci_ranges().
> >
> > There's no need to assign the resources to a temporary list first. Just
> > use bridge->windows directly and remove all the temporary list handling.
> >
> > Cc: Shawn Lin <shawn.lin@rock-chips.com>
> > Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> > Cc: Andrew Murray <andrew.murray@arm.com>
> > Cc: Bjorn Helgaas <bhelgaas@google.com>
> > Cc: Heiko Stuebner <heiko@sntech.de>
> > Cc: linux-rockchip@lists.infradead.org
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > ---
>
> I just tested mainline on my Samsung Chromebook Plus, and since
> yesterday I'm getting a "synchronous external abort" [1]. After a
> bisection, I found that this patch triggers the issue (this patch was
> merged yesterday)
This patch standalone triggers a compilation error - so it does
trigger a bisection but not the one you are enquiring about.
Can you try to bisect it again and report back please ?
Thanks,
Lorenzo
> I didn't look in detail yet, but if you have any idea of what could be
> the problem, that would be great.
>
> Thanks,
> Enric
>
> [1] https://hastebin.com/adasegihiw.rb
>
> > drivers/pci/controller/pcie-rockchip-host.c | 36 ++++-----------------
> > 1 file changed, 7 insertions(+), 29 deletions(-)
> >
> > diff --git a/drivers/pci/controller/pcie-rockchip-host.c b/drivers/pci/controller/pcie-rockchip-host.c
> > index ef8e677ce9d1..8d2e6f2e141e 100644
> > --- a/drivers/pci/controller/pcie-rockchip-host.c
> > +++ b/drivers/pci/controller/pcie-rockchip-host.c
> > @@ -950,14 +950,10 @@ static int rockchip_pcie_probe(struct platform_device *pdev)
> > struct device *dev = &pdev->dev;
> > struct pci_bus *bus, *child;
> > struct pci_host_bridge *bridge;
> > + struct resource *bus_res;
> > struct resource_entry *win;
> > - resource_size_t io_base;
> > - struct resource *mem;
> > - struct resource *io;
> > int err;
> >
> > - LIST_HEAD(res);
> > -
> > if (!dev->of_node)
> > return -ENODEV;
> >
> > @@ -995,29 +991,20 @@ static int rockchip_pcie_probe(struct platform_device *pdev)
> > if (err < 0)
> > goto err_deinit_port;
> >
> > - err = devm_of_pci_get_host_bridge_resources(dev, 0, 0xff,
> > - &res, &io_base);
> > + err = pci_parse_request_of_pci_ranges(dev, &bridge->windows, &bus_res);
> > if (err)
> > goto err_remove_irq_domain;
> >
> > - err = devm_request_pci_bus_resources(dev, &res);
> > - if (err)
> > - goto err_free_res;
> > + rockchip->root_bus_nr = bus_res->start;
> >
> > /* Get the I/O and memory ranges from DT */
> > - resource_list_for_each_entry(win, &res) {
> > + resource_list_for_each_entry(win, &bridge->windows) {
> > switch (resource_type(win->res)) {
> > case IORESOURCE_IO:
> > io = win->res;
> > io->name = "I/O";
> > rockchip->io_size = resource_size(io);
> > rockchip->io_bus_addr = io->start - win->offset;
> > - err = pci_remap_iospace(io, io_base);
> > - if (err) {
> > - dev_warn(dev, "error %d: failed to map resource %pR\n",
> > - err, io);
> > - continue;
> > - }
> > rockchip->io = io;
> > break;
> > case IORESOURCE_MEM:
> > @@ -1026,9 +1013,6 @@ static int rockchip_pcie_probe(struct platform_device *pdev)
> > rockchip->mem_size = resource_size(mem);
> > rockchip->mem_bus_addr = mem->start - win->offset;
> > break;
> > - case IORESOURCE_BUS:
> > - rockchip->root_bus_nr = win->res->start;
> > - break;
> > default:
> > continue;
> > }
> > @@ -1036,15 +1020,14 @@ static int rockchip_pcie_probe(struct platform_device *pdev)
> >
> > err = rockchip_pcie_cfg_atu(rockchip);
> > if (err)
> > - goto err_unmap_iospace;
> > + goto err_remove_irq_domain;
> >
> > rockchip->msg_region = devm_ioremap(dev, rockchip->msg_bus_addr, SZ_1M);
> > if (!rockchip->msg_region) {
> > err = -ENOMEM;
> > - goto err_unmap_iospace;
> > + goto err_remove_irq_domain;
> > }
> >
> > - list_splice_init(&res, &bridge->windows);
> > bridge->dev.parent = dev;
> > bridge->sysdata = rockchip;
> > bridge->busnr = 0;
> > @@ -1054,7 +1037,7 @@ static int rockchip_pcie_probe(struct platform_device *pdev)
> >
> > err = pci_scan_root_bus_bridge(bridge);
> > if (err < 0)
> > - goto err_unmap_iospace;
> > + goto err_remove_irq_domain;
> >
> > bus = bridge->bus;
> >
> > @@ -1068,10 +1051,6 @@ static int rockchip_pcie_probe(struct platform_device *pdev)
> > pci_bus_add_devices(bus);
> > return 0;
> >
> > -err_unmap_iospace:
> > - pci_unmap_iospace(rockchip->io);
> > -err_free_res:
> > - pci_free_resource_list(&res);
> > err_remove_irq_domain:
> > irq_domain_remove(rockchip->irq_domain);
> > err_deinit_port:
> > @@ -1097,7 +1076,6 @@ static int rockchip_pcie_remove(struct platform_device *pdev)
> >
> > pci_stop_root_bus(rockchip->root_bus);
> > pci_remove_root_bus(rockchip->root_bus);
> > - pci_unmap_iospace(rockchip->io);
> > irq_domain_remove(rockchip->irq_domain);
> >
> > rockchip_pcie_deinit_phys(rockchip);
> > --
> > 2.20.1
> >
> >
> > _______________________________________________
> > Linux-mediatek mailing list
> > Linux-mediatek@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-mediatek
next prev parent reply other threads:[~2019-12-06 14:09 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-28 16:32 [PATCH v3 00/25] PCI host resource consolidation Rob Herring
2019-10-28 16:32 ` [PATCH v3 01/25] resource: Add a resource_list_first_type helper Rob Herring
2019-10-28 16:32 ` [PATCH v3 02/25] PCI: Export pci_parse_request_of_pci_ranges() Rob Herring
2019-10-28 16:32 ` [PATCH v3 03/25] PCI: aardvark: Use pci_parse_request_of_pci_ranges() Rob Herring
2019-10-28 16:32 ` [PATCH v3 04/25] PCI: altera: " Rob Herring
2019-10-28 16:32 ` [PATCH v3 05/25] PCI: dwc: " Rob Herring
2019-10-28 16:32 ` [PATCH v3 06/25] PCI: faraday: " Rob Herring
2019-11-03 19:12 ` Linus Walleij
2019-10-28 16:32 ` [PATCH v3 07/25] PCI: iproc: " Rob Herring
2019-10-29 15:58 ` Srinath Mannam
2019-10-29 17:09 ` Florian Fainelli
2019-10-28 16:32 ` [PATCH v3 08/25] PCI: mediatek: " Rob Herring
2019-10-28 16:32 ` [PATCH v3 09/25] PCI: mobiveil: " Rob Herring
2019-10-29 9:00 ` Z.q. Hou
2019-10-28 16:32 ` [PATCH v3 10/25] PCI: rockchip: " Rob Herring
2019-12-05 17:56 ` Enric Balletbo Serra
2019-12-06 13:52 ` Lorenzo Pieralisi
2019-12-06 14:09 ` Lorenzo Pieralisi [this message]
2019-12-06 14:59 ` Enric Balletbo Serra
2019-10-28 16:32 ` [PATCH v3 11/25] PCI: rockchip: Drop storing driver private outbound resource data Rob Herring
2019-12-06 15:36 ` Lorenzo Pieralisi
2019-12-10 17:33 ` Enric Balletbo Serra
2019-12-11 9:39 ` Enric Balletbo Serra
2019-10-28 16:32 ` [PATCH v3 12/25] PCI: v3-semi: Use pci_parse_request_of_pci_ranges() Rob Herring
2019-10-28 16:32 ` [PATCH v3 13/25] PCI: xgene: " Rob Herring
2019-10-28 16:32 ` [PATCH v3 14/25] PCI: xilinx: " Rob Herring
2019-10-28 16:32 ` [PATCH v3 15/25] PCI: xilinx-nwl: " Rob Herring
2019-10-28 16:32 ` [PATCH v3 16/25] PCI: versatile: " Rob Herring
2019-10-28 16:32 ` [PATCH v3 17/25] PCI: versatile: Remove usage of PHYS_OFFSET Rob Herring
2019-10-28 16:32 ` [PATCH v3 18/25] PCI: versatile: Enable COMPILE_TEST Rob Herring
2019-10-28 16:32 ` [PATCH v3 19/25] PCI: of: Add inbound resource parsing to helpers Rob Herring
2019-10-29 11:07 ` Lorenzo Pieralisi
2019-10-29 15:56 ` Srinath Mannam
2019-10-29 17:34 ` Lorenzo Pieralisi
2019-10-30 6:44 ` Srinath Mannam
2019-10-30 11:48 ` Lorenzo Pieralisi
2019-10-30 12:49 ` Robin Murphy
2019-10-30 14:56 ` Lorenzo Pieralisi
2019-10-30 22:18 ` Rob Herring
2019-10-31 10:09 ` Lorenzo Pieralisi
2019-10-29 22:12 ` Bjorn Helgaas
2019-10-28 16:32 ` [PATCH v3 20/25] PCI: ftpci100: Use inbound resources for setup Rob Herring
2019-10-28 16:32 ` [PATCH v3 21/25] PCI: v3-semi: " Rob Herring
2019-10-28 16:32 ` [PATCH v3 22/25] PCI: xgene: " Rob Herring
2019-10-28 16:32 ` [PATCH v3 23/25] PCI: iproc: " Rob Herring
2019-10-29 15:59 ` Srinath Mannam
2019-10-28 16:32 ` [PATCH v3 24/25] PCI: rcar: " Rob Herring
2019-10-28 16:32 ` [PATCH v3 25/25] PCI: Make devm_of_pci_get_host_bridge_resources() static Rob Herring
2019-10-31 10:57 ` [PATCH v3 00/25] PCI host resource consolidation 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=20191206140901.GB26562@e121166-lin.cambridge.arm.com \
--to=lorenzo.pieralisi@arm.com \
--cc=Zhiqiang.Hou@nxp.com \
--cc=andrew.murray@arm.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bhelgaas@google.com \
--cc=eballetbo@gmail.com \
--cc=gustavo.pimentel@synopsys.com \
--cc=hch@infradead.org \
--cc=heiko@sntech.de \
--cc=horms@verge.net.au \
--cc=jingoohan1@gmail.com \
--cc=lftan@altera.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=m.karthikeyan@mobiveil.co.in \
--cc=matthias.bgg@gmail.com \
--cc=michal.simek@xilinx.com \
--cc=rfi@lists.rocketboards.org \
--cc=rjui@broadcom.com \
--cc=robh@kernel.org \
--cc=ryder.lee@mediatek.com \
--cc=sbranden@broadcom.com \
--cc=shawn.lin@rock-chips.com \
--cc=srinath.mannam@broadcom.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=tjoseph@cadence.com \
--cc=toan@os.amperecomputing.com \
--cc=will@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).