>
>
> On Sat, 16 Mar 2002, Keith Owens wrote:
> >
> > Does that mean that we also get rid of the initcall methods? If
> > shutdown follows a device tree then startup should also use that tree.
>
> You cannot _build_ the tree without the initcall methods - it's populating
> the tree that the initcalls mostly do, after all.
Actually, you could theoretically get rid of the device initcalls.
The device tree is built by the bus drivers, before the driver initcalls.
The driver initcalls simply check for existence of devices they support.
Once the device tree is built, you could do one walk of the tree, take the
device id of each device, and query the device drivers to see if they
support it or not.
This requires the device ID tables to be in a special section; or to use
the probe() function and pass it a device id. Or, pass the device id to
/sbin/hotplug so it can load the right module.
> We could make one of the methods be "startup", of course, and move the
> actual device initialization there (and leave just the "find driver" in
> the initcall logic), but that would not get rid of the initcalls, it would
> just split them into two parts.
Yes. jgarzik has been saying this for some time, and I fully agree. You
really only want to check if you have a device you support and continue
on. (By delaying initialization, you can also keep the device in a low
power state until you're really ready to use it as well.)
-pat
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/