Skip to content

Commit ed458df

Browse files
committed
PnP: move pnpacpi/pnpbios_init to after PCI init
We already did that a long time ago for pnp_system_init, but pnpacpi_init and pnpbios_init remained as subsys_initcalls, and get linked into the kernel before the arch-specific routines that finalize the PCI resources (pci_subsys_init). This means that the PnP routines would either register their resources before the PCI layer could, or would be unable to check whether a PCI resource had already been registered. Both are problematic. I wanted to do this before 2.6.27, but every time we change something like this, something breaks. That said, _every_ single time we trust some firmware (like PnP tables) more than we trust the hardware itself (like PCI probing), the problems have been worse. Signed-off-by: Linus Torvalds <[email protected]>
1 parent 82219fc commit ed458df

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

drivers/pnp/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22
# Makefile for the Linux Plug-and-Play Support.
33
#
44

5-
obj-y := core.o card.o driver.o resource.o manager.o support.o interface.o quirks.o system.o
5+
obj-y := core.o card.o driver.o resource.o manager.o support.o interface.o quirks.o
66

77
obj-$(CONFIG_PNPACPI) += pnpacpi/
88
obj-$(CONFIG_PNPBIOS) += pnpbios/
99
obj-$(CONFIG_ISAPNP) += isapnp/
1010

11+
# pnp_system_init goes after pnpacpi/pnpbios init
12+
obj-y += system.o
13+
1114
ifeq ($(CONFIG_PNP_DEBUG),y)
1215
EXTRA_CFLAGS += -DDEBUG
1316
endif

drivers/pnp/pnpacpi/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ static int __init pnpacpi_init(void)
268268
return 0;
269269
}
270270

271-
subsys_initcall(pnpacpi_init);
271+
fs_initcall(pnpacpi_init);
272272

273273
static int __init pnpacpi_setup(char *str)
274274
{

drivers/pnp/pnpbios/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ static int __init pnpbios_init(void)
571571
return 0;
572572
}
573573

574-
subsys_initcall(pnpbios_init);
574+
fs_initcall(pnpbios_init);
575575

576576
static int __init pnpbios_thread_init(void)
577577
{

0 commit comments

Comments
 (0)