lkml.org 
[lkml]   [2012]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: linux-next: boot failure for next-20120227 and later (pci tree related)
    On Sun, Mar 4, 2012 at 8:34 PM, Benjamin Herrenschmidt
    <benh@kernel.crashing.org> wrote:
    > On Sat, 2012-03-03 at 08:52 +1100, Benjamin Herrenschmidt wrote:
    >
    >> 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

    > diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c
    > 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)
    >  {
    >        u64 base, size;
    >        unsigned int flags;
    > +       struct pci_bus_region region;
    >        struct resource *res;
    >        const u32 *addrs;
    >        u32 i;
    > @@ -106,10 +107,12 @@ static void of_pci_parse_addrs(struct device_node *node, struct pci_dev *dev)
    >                        printk(KERN_ERR "PCI: bad cfg reg num 0x%x\n", i);
    >                        continue;
    >                }
    > -               res->start = base;
    > -               res->end = base + size - 1;
    > +
    >                res->flags = flags;
    >                res->name = pci_name(dev);
    > +               region.start = base;
    > +               region.end = base + size - 1;
    > +               pcibios_bus_to_resource(dev, res, &region);
    >        }
    >  }
    >
    > @@ -209,6 +212,7 @@ void __devinit of_scan_pci_bridge(struct pci_dev *dev)
    >        struct pci_bus *bus;
    >        const u32 *busrange, *ranges;
    >        int len, i, mode;
    > +       struct pci_bus_region region;
    >        struct resource *res;
    >        unsigned int flags;
    >        u64 size;
    > @@ -270,9 +274,10 @@ void __devinit of_scan_pci_bridge(struct pci_dev *dev)
    >                        res = bus->resource[i];
    >                        ++i;
    >                }
    > -               res->start = of_read_number(&ranges[1], 2);
    > -               res->end = res->start + size - 1;
    >                res->flags = flags;
    > +               region.start = of_read_number(&ranges[1], 2);
    > +               region.end = region.start + size - 1;
    > +               pcibios_bus_to_resource(dev, res, &region);
    >        }
    >        sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus),
    >                bus->number);
    >
    >
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2012-03-05 17:17    [W:0.027 / U:180.012 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site