lkml.org 
[lkml]   [1999]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] Unifying kernel initialization
On Tue, May 04, 1999 at 08:42:18PM +0200, Andi Kleen wrote:
> >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.
>
> BTW, the ELF section trick could be used for sysctls too,
> like FreeBSD does. This would remove another ugly initialization
> call.

Let me throw in another idea:
I would like to register the module upon initialization by init/main.c just
as modules are registered by their name and reported by /proc/modules. This
would allow for something like /proc/components to report all statically
linked kernel parts.
Upon insertion of a module by insmod, we would check both lists, whether the
module is already there and preventing it from being loaded twice (maybe
modules where it is allowed can set a flag to prevent this).
This would also solve some issues with modules being inserted in spite of
static code being compiled into the kernel.
[Try it with scsi_mod, but sync and remount ro before.]


Regards,
--
Kurt Garloff <garloff@suse.de> SuSE GmbH, Nürnberg, FRG
Linux kernel development; SCSI driver: DC390 (tmscsim/AM53C974)
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.121 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site