Re: [RFC] Unifying kernel initialization

Paul Rusty Russell (Paul.Russell@rustcorp.com.au)
Wed, 05 May 1999 04:04:29 +0930


In message <99May4.204226met_dst.140575-1@colin.muc.de> you write:
> In muc.lists.linux-kernel, you wrote:
> >This all seems terribly clumsy. I was thinking
> >that a better way to do it would be to have a
> >macro REGISTER_INIT_FUNC(function,priority),
> >which would add the nessesary info to the
> >object file. Then, the kernel would need only
> >to loop over this list and all the kernel would
> >be initialized in order.
>
> I 100% agree. It could be easily implemented using a special
> ELF section. Afaik there are already plans to do it in 2.3.

Rather than a numeric priority, give it a name, a list of things that
must preceed it, and a list of things it must preceed. Calculate the
initialisation order at runtime, and then drop that whole section of
code and data after initialization.

Rusty.

--
Tridge, Raster, DaveM, Cort, maddog... Where will you be 9-11 July 1999?
                http://www.linux.org.au/projects/calu

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/