Re: [RFC] Unifying kernel initialization

Kurt Garloff (garloff@suse.de)
Wed, 5 May 1999 01:11:38 +0200


--r5Pyd7+fXNt84Ff3
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

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.
>=20
> I 100% agree. It could be easily implemented using a special
> ELF section. Afaik there are already plans to do it in 2.3.
>=20
> BTW, the ELF section trick could be used for sysctls too,
> like FreeBSD does. This would remove another ugly initialization
> call.=20

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.=20
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.=20
[Try it with scsi_mod, but sync and remount ro before.]

Regards,
--=20
Kurt Garloff <garloff@suse.de> SuSE GmbH, N=FCrnberg, FRG
Linux kernel development; SCSI driver: DC390 (tmscsim/AM53C974)

--r5Pyd7+fXNt84Ff3
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3in

iQCVAwUBNy9+qhaQN/7O/JIVAQGxrwP/bz6J4p4uW4n8d6ZjQ7HICC0wiRJGzGzs
IOQh9CHznEG/xLIlKzfXajWbrNINgXx0qP5RWOa3JXzdOYveQObarCmEnjsgVInU
Ps1KC5PQj5bf2d1+7QjmQvO6sdZnJI9693aI5ki7ioOSudO/QcKGtqDH+CRqA1wA
PDuZpwhKoFU=
=iDyM
-----END PGP SIGNATURE-----

--r5Pyd7+fXNt84Ff3--

-
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/