Re: Boot failure on gru-scarlet-inx with 5.9-rc2

From: Samuel Dionne-Riel
Date: Wed Sep 02 2020 - 23:48:08 EST


On Wed, 2 Sep 2020 17:01:19 +0100
Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx> wrote:

> On Tue, Sep 01, 2020 at 02:33:56PM -0400, Samuel Dionne-Riel wrote:
>
> Please print a pointer as a pointer and print both bus and
> bus->parent.

Hopefully pointer as a pointer is %px. Not sure what else, if that's
wrong please tell.

---
@@ -79,6 +79,8 @@ static int rockchip_pcie_valid_device(struct rockchip_pcie *rockchip,
* do not read more than one device on the bus directly attached
* to RC's downstream side.
*/
+ printk("[!!] // bus (%px) bus->parent (%px)\n", bus, bus->parent);
+ printk("[!!] bus->primary (%d) == rockchip->root_bus_nr (%d) && dev (%d) > 0\n", bus->primary, rockchip->root_bus_nr, dev);
if (bus->primary == rockchip->root_bus_nr && dev > 0)
return 0;

--

Again, two values, verified with a bit of set and `sort -u`.

[ 1.691266] [!!] // bus (ffff0000ef9ab800) bus->parent (0000000000000000)
[ 1.691271] [!!] bus->primary (0) == rockchip->root_bus_nr (0) && dev (0) > 0

and

[ 1.697156] [!!] // bus (ffff0000ef9ac000) bus->parent (ffff0000ef9ab800)
[ 1.697160] [!!] bus->primary (0) == rockchip->root_bus_nr (0) && dev (0) > 0

First instance of each shown here. Last time I don't think it was.

> > + printk("[!!] bus->primary (%d) == rockchip->root_bus_nr
> > (%d) && dev (%d) > 0\n", bus->primary, rockchip->root_bus_nr, dev);
> > if (bus->primary == rockchip->root_bus_nr && dev > 0) return 0;
> >
> > --
> >
> > I get two kind of results
> >
> > [ 1.692913] [!!] // bus->parent (0)
> > [ 1.692917] [!!] bus->primary (0) == rockchip->root_bus_nr (0)
> > && dev (0) > 0
> >
> > and
> >
> > [ 1.693055] [!!] // bus->parent (-256794624)
> > [ 1.693058] [!!] bus->primary (0) == rockchip->root_bus_nr (0)
> > && dev (0) > 0
>
> Looks like this is the condition that pci_is_root_bus(bus->parent) is
> not hitting.
>



> You are accessing a resource IORESOURCE_MEM that has nothing to do
> with bus numbers.
>
> s/IORESOURCE_MEM/IORESOURCE_BUS
>
> should be better ;-)

At least correct, rather than luckily working.


Thanks, as always, anything I missed, or need more precisions, do ask.

--
Samuel Dionne-Riel