At 4:11 PM -0600 21/7/03, Eric W. Biederman wrote:
ron minnich rminnich@lanl.gov writes:
On Mon, 21 Jul 2003, Stefan Reinauer wrote:
we're not going to fork.
That was more of a warning about what could happen. We have lots of committers out there and more are going to join. We may not always agree on how things are done, and we must not get into the habit of ripping each other's code out -- that way lies madness.
There are some major design decisions coming before we freeze the 2.0 core, and this is just a warning that we need to be looking at these things closely, and that there are some strong opinions out there. I never had any intention of forking.
The target is to have a hardware independent hardwaremain.c
We have called a cease fire for a until I get back with Ron and Greg promising to look at what I have done with the device stuff.
If a enumerate_static_devices can be written that converts from the chip tree to the device tree and we get everyone working with and familiar with both pieces of the code we should be able to have some more rational discussion about what needs to happen.
Conversations beyond this need to start hitting the list.
Eric
The issue for me is that I need to have static initialization working before I can continue, so my intention is build something that will hopefully be acceptable to everyone. I can probably merge the chip and device structures that gives me a way forward without replicating what Eric is doing. However a single call to enumerate_static_devices, particularly at the current location, is NOT acceptable to me.
Here's my suggestion to move forward:
1. I need to be able to enable/configure static devices at specific points in hardwaremain, particularly on entry, after console_init and prior to pci enumeration. I suggest a routine called device_configure() that is passed the root of the device tree and a pass flag:
void device_configure(struct device *, enum dev_pass)
enum dev_pass { DEV_PASS_PRE_CONSOLE, DEV_PASS_PRE_PCI, DEV_PASS_ENUMERATE, DEV_PASS_CONFIGURE, DEV_PASS_ENABLE, DEV_PASS_INITIALIZE };
Calls to device_configure() with the appropriate flag will be inserted in the appropriate locations in hardwaremain. More flags/calls call be added if necessary. Calls to dev_enumerate(), dev_configure(), etc. to probe and configure dynamic bus devices will be replaced with calls to device_configure() with the appropriate flag. Dynamic devices will be added to the device tree as appropriate.
2. New fields added to struct device, including a 'static' flag that is set for static devices, and something analogous to the chip structure for static device info.
3. Continue use of the chip.h files in configuration directories (although the name could be changed to device.h) and the 'register' configuration directive.
4. Removal of all device specific calls from hardwaremain, such as 'init_timer()' into static initialization files using (4) above.
5. The configuration process will build a static device tree that will be called device_{target}.c in the target build directory and linked with the linuxbios image.
My intention is to start coding this tomorrow, so if anyone has any major objections/suggestions, please let me know asap.
Regards,
Greg