From: Linus Torvalds <torvalds@linux-foundation.org>
To: Rene Herman <rene.herman@keyaccess.nl>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
Len Brown <lenb@kernel.org>, Frans Pop <elendil@planet.nl>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
linux-acpi@vger.kernel.org, Adam Belay <abelay@mit.edu>,
Avuton Olrich <avuton@gmail.com>,
Karl Bellve <karl.bellve@umassmed.edu>,
Willem Riede <wriede@riede.org>,
Matthew Hall <mhall@mhcomputing.net>
Subject: Re: [patch 2/2] PNP: don't check disabled PCI BARs for conflicts in quirk_system_pci_resources()
Date: Tue, 30 Sep 2008 11:01:38 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.2.00.0809301052200.3436@nehalem.linux-foundation.org> (raw)
In-Reply-To: <alpine.LFD.2.00.0809300904530.3389@nehalem.linux-foundation.org>
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?
Ie, maybe the proper thing to do is to simply be *consistent* in the PnP
subsystem, and always use fs_initcall (for the stated reasons!) for the
device discovery. Ie the patch would be something like the appended, and
then you really can depend on the PCI subsystem having been set up,
including having all relevant resources inserted into the tree!
Hmm? Bjorn? Everything that is true about "pnp_system_init" should be
equally true abote pnpacpi_init and pnpbios_init, no?
Linus
---
drivers/pnp/pnpacpi/core.c | 2 +-
drivers/pnp/pnpbios/core.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
index c1b9ea3..53561d7 100644
--- a/drivers/pnp/pnpacpi/core.c
+++ b/drivers/pnp/pnpacpi/core.c
@@ -268,7 +268,7 @@ static int __init pnpacpi_init(void)
return 0;
}
-subsys_initcall(pnpacpi_init);
+fs_initcall(pnpacpi_init);
static int __init pnpacpi_setup(char *str)
{
diff --git a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c
index 19a4be1..662dfcd 100644
--- a/drivers/pnp/pnpbios/core.c
+++ b/drivers/pnp/pnpbios/core.c
@@ -571,7 +571,7 @@ static int __init pnpbios_init(void)
return 0;
}
-subsys_initcall(pnpbios_init);
+fs_initcall(pnpbios_init);
static int __init pnpbios_thread_init(void)
{
next prev parent reply other threads:[~2008-09-30 18:01 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-29 15:53 [patch 0/2] don't check disabled PCI BARs for conflicts with PNP devices Bjorn Helgaas
2008-09-29 15:56 ` [patch 1/2] PCI: add pci_resource_enabled() Bjorn Helgaas
2008-09-29 15:57 ` [patch 2/2] PNP: don't check disabled PCI BARs for conflicts in quirk_system_pci_resources() Bjorn Helgaas
2008-09-29 16:34 ` Linus Torvalds
2008-09-29 18:31 ` Rene Herman
2008-09-29 19:13 ` Linus Torvalds
2008-09-30 9:19 ` Rene Herman
2008-09-30 14:48 ` Linus Torvalds
2008-09-30 15:57 ` Rene Herman
2008-09-30 16:29 ` Linus Torvalds
2008-09-30 17:10 ` Linus Torvalds
2008-09-30 17:21 ` Linus Torvalds
2008-09-30 19:29 ` Rene Herman
2008-09-30 19:37 ` Rene Herman
2008-09-30 19:44 ` Linus Torvalds
2008-09-30 20:48 ` Rene Herman
2008-09-30 19:38 ` Ingo Molnar
2008-09-30 19:51 ` Linus Torvalds
2008-09-30 19:54 ` Arjan van de Ven
2008-09-30 20:01 ` Ingo Molnar
2008-10-01 6:13 ` Grant Grundler
2008-10-01 8:26 ` Ingo Molnar
2008-10-06 5:34 ` Grant Grundler
2008-10-01 15:14 ` Linus Torvalds
2008-10-01 16:21 ` Yinghai Lu
2008-09-30 20:05 ` Rolf Eike Beer
2008-10-01 8:52 ` Ingo Molnar
2008-09-30 18:01 ` Linus Torvalds [this message]
2008-09-30 18:13 ` Linus Torvalds
2008-09-30 19:51 ` Rene Herman
2008-09-30 19:16 ` Bjorn Helgaas
2008-09-30 19:12 ` Bjorn Helgaas
2008-10-01 20:18 ` Bjorn Helgaas
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.0809301052200.3436@nehalem.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=abelay@mit.edu \
--cc=avuton@gmail.com \
--cc=bjorn.helgaas@hp.com \
--cc=elendil@planet.nl \
--cc=jbarnes@virtuousgeek.org \
--cc=karl.bellve@umassmed.edu \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mhall@mhcomputing.net \
--cc=rene.herman@keyaccess.nl \
--cc=rjw@sisk.pl \
--cc=wriede@riede.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