[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200809301316.55780.bjorn.helgaas@hp.com>
Date: Tue, 30 Sep 2008 13:16:54 -0600
From: Bjorn Helgaas <bjorn.helgaas@...com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Rene Herman <rene.herman@...access.nl>,
Jesse Barnes <jbarnes@...tuousgeek.org>,
Len Brown <lenb@...nel.org>, Frans Pop <elendil@...net.nl>,
"Rafael J. Wysocki" <rjw@...k.pl>, linux-kernel@...r.kernel.org,
linux-pci@...r.kernel.org, linux-acpi@...r.kernel.org,
Adam Belay <abelay@....edu>, Avuton Olrich <avuton@...il.com>,
Karl Bellve <karl.bellve@...ssmed.edu>,
Willem Riede <wriede@...de.org>,
Matthew Hall <mhall@...omputing.net>
Subject: Re: [patch 2/2] PNP: don't check disabled PCI BARs for conflicts in quirk_system_pci_resources()
On Tuesday 30 September 2008 12:01:38 pm Linus Torvalds wrote:
>
> On Tue, 30 Sep 2008, Linus Torvalds wrote:
> >
> > In contrast, the PnP fixup thing is called from pnp_fixup_device, called
> > from __pnp_add_device(), called from pnp_add_device() (and
> > pnp_add_card(), but that should be later), and those in turn from
> > pnpacpi_add_device and pnpacpi_init().
> >
> > And pnpacpi_init is _also_ a subsys_initcall [...]
>
> Btw, why is that? We very much have a separate
>
> /**
> * Reserve motherboard resources after PCI claim BARs,
> * but before PCI assign resources for uninitialized PCI devices
> */
> fs_initcall(pnp_system_init);
>
> which is called much later. That seems to be the _right_ point for any
> quirks. It seems that the _real_ problem here is that the PnP device fixup
> is simply called from the wrong point. Ie, why do we do device discovery -
> and thus PnP quirks - in pnp_init (before the PCI bus is actually fully
> initialized!), rather than in pnp_system_init?
Right. The point of this quirk (quirk_system_pci_resources()) is to
prevent the PNP system driver from claiming resources that are actually
used by PCI. So I don't think there's any reason to run it before we
bind the driver to the device. PNP doesn't currently have any early/
late concept for quirks, but we probably should add one.
Feels like a post-2.6.27 project though.
Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists