lkml.org 
[lkml]   [1999]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[RFC] Unifying kernel initialization
One of the things I've always found a little
strange about drivers in the Linux kernel, was
that the driver code was different depending
on whether it was built into the kernel or not.

If it was built into the kernel, you'd have to
add it to the mess in init/main.c or similar
and add a call for it somewhere. If it's a
module, some code needs to be added in the
module surrounded by #ifdef's

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.

This also means that you could control the
order of loading of modules from the module
source, without having to patch any other
files.

You could also use ld -r to bundle modules
together and everything would still load
fine.

Also, how about reserving a certain amount
of memory after the loaded kernel image for
loading modules into so they don't use PTEs
or TLBEs.

Ofcourse, I may be dreaming and there is some
fundumental flaw with this idea.

Martijn van Oosterhout
Australia

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

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.076 / U:1.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site