lkml.org 
[lkml]   [2009]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Regression with commit f9cde5f in 2.6.30-gitX
From
Date
On Wed, 2009-06-24 at 16:51 +0200, Thomas Gleixner wrote:
> On Wed, 24 Jun 2009, Jaswinder Singh Rajput wrote:
> > Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
> > Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> > ---
> > arch/x86/pci/acpi.c | 16 ++++++++++------
> > 1 files changed, 10 insertions(+), 6 deletions(-)
> >
> > diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
> > index 16c3fda..0bc015f 100644
> > --- a/arch/x86/pci/acpi.c
> > +++ b/arch/x86/pci/acpi.c
> > @@ -69,6 +69,9 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
> > struct resource *root;
> > int max_root_bus_resources = PCI_BUS_NUM_RESOURCES;
> >
> > + if (info->res_num >= PCI_BUS_NUM_RESOURCES)
> > + return AE_OK;
> > +

We need to test this otherwise we will get another oops.

> > status = resource_to_addr(acpi_res, &addr);
> > if (!ACPI_SUCCESS(status))
> > return AE_OK;
> > @@ -94,17 +97,18 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
> > if (bus_has_transparent_bridge(info->bus))
> > max_root_bus_resources -= 3;
> > if (info->res_num >= max_root_bus_resources) {
> > - printk(KERN_WARNING "PCI: Failed to allocate 0x%lx-0x%lx "
> > - "from %s for %s due to _CRS returning more than "
> > - "%d resource descriptors\n", (unsigned long) res->start,
> > - (unsigned long) res->end, root->name, info->name,
> > - max_root_bus_resources);
> > + pr_warning("PCI: Failed to allocate 0x%lx-0x%lx "
> > + "from %s for %s due to _CRS returning more than "
> > + "%d resource descriptors\n",
> > + (unsigned long)res->start, (unsigned long)res->end,
> > + root->name, info->name, max_root_bus_resources);
>
> Can you please avoid mixing cleanup patches with bug fixes ? I almost
> did not see the line below.
>
> > + info->bus->resource[info->res_num] = res;
>

We need to set the resource even it is transparent bridge, otherwise pci
will fail and system will not able to boot.

> Storing the resource in defeats the purpose of the original patch,
> which makes sure that we do _NOT_ use the last 3 slots of the resource
> array for a root bus with a transparent bridge.
>
> > info->res_num++;
>
> This is the real bug. info->res_num should not be incremented when we
> run out of resources already.
>

No, you cannot remove it, otherwise you will get another oops.

You need all of the 3 things above otherwise system will not boot. Only
thing you can remove is cleanup ;-)

Or you need to revert f9cde5ffed17bf74f6bef

Thanks,
--
JSR



\
 
 \ /
  Last update: 2009-06-24 17:59    [W:0.087 / U:4.644 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site