mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Jaswinder Singh Rajput <jaswinder@kernel.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	Gary Hade <garyhade@us.ibm.com>,
	Jesse Barnes <jbarnes@virtuousgeek.org>,
	LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
	x86 maintainers <x86@kernel.org>, Len Brown <lenb@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: Regression with commit f9cde5f in 2.6.30-gitX
Date: Wed, 24 Jun 2009 18:17:18 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.00.0906241802170.2767@localhost.localdomain> (raw)
In-Reply-To: <1245858948.3216.4.camel@localhost.localdomain>

On Wed, 24 Jun 2009, Jaswinder Singh Rajput wrote:
> 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.

Right, because you would store beyond the end of the array.
 
> > >  	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.

The fact that the system does boot with that patch is not making the
patch more correct. It fixes the boot problem at hand, but it does not
fix the root cause of the problem.

You stick the resource into the resource array, but it does not call
insert_resource(). Also you print a warning while the system seems to
be happy to use the device.

This is just inconsistent and the patch simply papers over the root
cause of the problem.

The reservation of the last 3 resources in the transparent case is
more likely the real reason as it reduces the number of available
slots in bus->resource[].

Can you please increase PCI_BUS_NUM_RESOURCES by at least 3 and test
with the one liner patch which removes the increment applied.

Also please provide the output of lspci on 2.6.30 (which does not have
f9cde5f applied).

Thanks,

	tglx


  reply	other threads:[~2009-06-24 16:19 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-24  1:33 Larry Finger
2009-06-24  5:31 ` Larry Finger
2009-06-24 12:16 ` Jaswinder Singh Rajput
2009-06-24 12:22   ` Ingo Molnar
2009-06-24 12:30     ` Jaswinder Singh Rajput
2009-06-24 14:46     ` Gary Hade
2009-06-24 14:21   ` Larry Finger
2009-06-24 15:16     ` Ingo Molnar
2009-06-24 15:19     ` Thomas Gleixner
2009-06-24 15:42       ` Larry Finger
2009-06-24 15:57       ` Jaswinder Singh Rajput
2009-06-24 16:13         ` Gary Hade
2009-06-24 16:33           ` Jaswinder Singh Rajput
2009-06-24 16:44             ` Jesse Barnes
2009-06-24 17:55               ` Gary Hade
2009-06-24 18:28                 ` Jesse Barnes
2009-06-24 18:45                   ` Thomas Gleixner
2009-06-24 19:48                     ` Gary Hade
2009-06-24 20:05                       ` Larry Finger
2009-06-24 21:24                         ` Gary Hade
2009-06-24 22:12                           ` Gary Hade
2009-06-24 21:32                         ` Yinghai Lu
2009-06-24 21:42                           ` Larry Finger
2009-06-24 21:44                             ` Yinghai Lu
2009-06-24 22:04                               ` Larry Finger
2009-06-24 22:11                                 ` Yinghai Lu
2009-06-24 22:53                                   ` Yinghai Lu
2009-06-24 23:33                                     ` Larry Finger
2009-06-24 23:44                                       ` Linus Torvalds
2009-06-24 19:28             ` Gary Hade
2009-06-24 16:52           ` Larry Finger
2009-06-24 14:51   ` Thomas Gleixner
2009-06-24 15:55     ` Jaswinder Singh Rajput
2009-06-24 16:17       ` Thomas Gleixner [this message]
2009-06-24 15:56     ` Gary Hade
2009-06-24 16:15       ` Jaswinder Singh Rajput
2009-06-24 16:33         ` Gary Hade
2009-06-24 16:25       ` Jesse Barnes

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=alpine.LFD.2.00.0906241802170.2767@localhost.localdomain \
    --to=tglx@linutronix.de \
    --cc=Larry.Finger@lwfinger.net \
    --cc=garyhade@us.ibm.com \
    --cc=jaswinder@kernel.org \
    --cc=jbarnes@virtuousgeek.org \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@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

all inboxes | Powered by JetHome®