Thread (6 messages) 6 messages, 3 authors, 2012-03-05

Re: linux-next: boot failure for next-20120227 and later (pci tree related)

flat view

From: Bjorn Helgaas <bhelgaas@google.com>
Date: 2012-03-05 16:14:30
Also in: linux-next, lkml

On Sun, Mar 4, 2012 at 8:34 PM, Benjamin Herrenschmidt
[off-list ref] wrote:
On Sat, 2012-03-03 at 08:52 +1100, Benjamin Herrenschmidt wrote:
quoted
Or give me a chance to dig :-) I'll have a look next week.
This is indeed what bjorn suspected on irc, this patch fixes it:

(Bjorn, please fold it in the original offending patch)
Thanks for checking this out.  Sparc should have the same problem, so
I'll post both updates in a bit.

Bjorn
quoted hunk ↗ jump to hunk
diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_=
of_scan.c
quoted hunk ↗ jump to hunk
index b37d0b5..5dd63f1 100644
--- a/arch/powerpc/kernel/pci_of_scan.c
+++ b/arch/powerpc/kernel/pci_of_scan.c
@@ -75,6 +75,7 @@ static void of_pci_parse_addrs(struct device_node *node=
, struct pci_dev *dev)
quoted hunk ↗ jump to hunk
=A0{
=A0 =A0 =A0 =A0u64 base, size;
=A0 =A0 =A0 =A0unsigned int flags;
+ =A0 =A0 =A0 struct pci_bus_region region;
=A0 =A0 =A0 =A0struct resource *res;
=A0 =A0 =A0 =A0const u32 *addrs;
=A0 =A0 =A0 =A0u32 i;
@@ -106,10 +107,12 @@ static void of_pci_parse_addrs(struct device_node *=
node, struct pci_dev *dev)
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0printk(KERN_ERR "PCI: bad =
cfg reg num 0x%x\n", i);
quoted hunk ↗ jump to hunk
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0continue;
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 res->start =3D base;
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 res->end =3D base + size - 1;
+
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0res->flags =3D flags;
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0res->name =3D pci_name(dev);
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 region.start =3D base;
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 region.end =3D base + size - 1;
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 pcibios_bus_to_resource(dev, res, &region);
=A0 =A0 =A0 =A0}
=A0}
@@ -209,6 +212,7 @@ void __devinit of_scan_pci_bridge(struct pci_dev *dev=
)
quoted hunk ↗ jump to hunk
=A0 =A0 =A0 =A0struct pci_bus *bus;
=A0 =A0 =A0 =A0const u32 *busrange, *ranges;
=A0 =A0 =A0 =A0int len, i, mode;
+ =A0 =A0 =A0 struct pci_bus_region region;
=A0 =A0 =A0 =A0struct resource *res;
=A0 =A0 =A0 =A0unsigned int flags;
=A0 =A0 =A0 =A0u64 size;
@@ -270,9 +274,10 @@ void __devinit of_scan_pci_bridge(struct pci_dev *de=
v)
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0res =3D bus->resource[i];
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0++i;
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 res->start =3D of_read_number(&ranges[1], 2=
);
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 res->end =3D res->start + size - 1;
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0res->flags =3D flags;
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 region.start =3D of_read_number(&ranges[1],=
 2);
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 region.end =3D region.start + size - 1;
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 pcibios_bus_to_resource(dev, res, &region);
=A0 =A0 =A0 =A0}
=A0 =A0 =A0 =A0sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus)=
,
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bus->number);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help