Re: [patch 2/2] PNP: don't check disabled PCI BARs for conflicts in quirk_system_pci_resources()

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Grant Grundler <grundler@...>
Cc: Ingo Molnar <mingo@...>, Arjan van de Ven <arjan@...>, Rene Herman <rene.herman@...>, Bjorn Helgaas <bjorn.helgaas@...>, Jesse Barnes <jbarnes@...>, Len Brown <lenb@...>, Frans Pop <elendil@...>, Rafael J. Wysocki <rjw@...>, Linux Kernel Mailing List <linux-kernel@...>, <linux-pci@...>, <linux-acpi@...>, Adam Belay <abelay@...>, Avuton Olrich <avuton@...>, Karl Bellve <karl.bellve@...>, Willem Riede <wriede@...>, Matthew Hall <mhall@...>, Sam Ravnborg <sam@...>
Date: Wednesday, October 1, 2008 - 11:14 am

On Wed, 1 Oct 2008, Grant Grundler wrote:

Absolutely. 

The problem with the current <linux/init.h> isn't that it doesn't work - 
it's worked pretty well for a long time - it's that we continually tend to 
hit the limits of the few fixed points.

I would just extend on that notion a bit, and also make the markers a bit 
more dynamic. Instead of having just 7-8 levels of initcalls, and a very 
fixed naming that is a bit misleading, I'd like to extend it to maybe 50 
levels, and the levels would be named by the subsystems and then just have 
one single place that orders them.

The old 7 levels (plus the "pure" one) would still exist, so it wouldn't 
need to be a flag-day event.

For example: why would you use "fs_initcall()" for the PnP init? The 
reason is simple: it's not a filesystem init, but it's the one that comes 
after the subsys init and before the actual low-leveld drivers. We used to 
initialize the core filesystem data (VFS) at that stage (we still do, 
although most of the actual filesystems are actually just done using the 
default module-init much later), which explains the naming, but the 
problem is that

 (a) we want to order things at a finer granularity than that
 (b) we want to have a better and more descriptive naming

but the basic notion of having a fixed ordering certainly isn't wrong (and 
I already argued against any _dynamic_ one).


It would be *much* better to give them symbolic names (easy enough - we 
just turn them into sections that are symbolic anyway), and then have a 
list of ordering for those symbolic names.

So they sure as hell would be much better than being named "Point B". We 
could get rid of

	subsys_initcall(pci_init)

and instead do

	initcall(pci_init, "pci");
	..
	initcall(pnp_init, "pnp");

and then just list the levels for the linker scripts in one place. So that 
we wouldn't really have to worry about link ordering: if the link ordering 
is wrong, we just add a new initcall level and insert it in the right 
place, and then we can look at the ordering and see it explicitly in one 
place instead of looking at the makefiles and checking the order we add 
object files to the list in!

		Linus
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [patch 2/2] PNP: don't check disabled PCI BARs for confl..., Linus Torvalds, (Wed Oct 1, 11:14 am)
[patch 1/2] PCI: add pci_resource_enabled(), Bjorn Helgaas, (Mon Sep 29, 11:56 am)