summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2002-11-10 17:08:07 -0800
committerAndy Grover <agrover@groveronline.com>2002-11-10 17:08:07 -0800
commitaa65be3f456be1ac4359f7fffeb7b4ae3c149419 (patch)
tree7deb9cf5ee0103545138396b83bc260092ab8240 /init
parent850b830c9639af788e2917aed3aea8d8bb9da1a1 (diff)
[PATCH] In-kernel Module Loader
This is an implementation of the in-kernel module loader extending the try_inc_mod_count() primitive and making its use compulsory. This has the benifit of simplicity, and similarity to the existing scheme. To reduce the cost of the constant increments and decrements, reference counters are lockless and per-cpu. Eliminated (coming in following patches): o Modversions o Module parameters o kallsyms o EXPORT_SYMBOL_GPL and MODULE_LICENCE checks o DEVICE_TABLE support. New features: o Typesafe symbol_get/symbol_put o Single "insert this module" syscall interface allows trivial userspace. o Raceless loading and unloading You will need the trivial replacement module utilities from: http://ozlabs.org/~rusty/module-init-tools-0.6.tar.gz
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig21
-rw-r--r--init/main.c5
2 files changed, 9 insertions, 17 deletions
diff --git a/init/Kconfig b/init/Kconfig
index fbce2d79f8f9..01fc9fd77fea 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -116,21 +116,14 @@ config MODULES
may want to make use of modules with this kernel in the future, then
say Y here. If unsure, say Y.
-config MODVERSIONS
- bool "Set version information on all module symbols"
+config MODULE_UNLOAD
+ bool "Module unloading"
depends on MODULES
- ---help---
- Usually, modules have to be recompiled whenever you switch to a new
- kernel. Saying Y here makes it possible, and safe, to use the
- same modules even after compiling a new kernel; this requires the
- program modprobe. All the software needed for module support is in
- the modutils package (check the file <file:Documentation/Changes>
- for location and latest version). NOTE: if you say Y here but don't
- have the program genksyms (which is also contained in the above
- mentioned modutils package), then the building of your kernel will
- fail. If you are going to use modules that are generated from
- non-kernel sources, you would benefit from this option. Otherwise
- it's not that important. So, N ought to be a safe bet.
+ help
+ Without this option you will not be able to unload any
+ modules (note that some modules may not be unloadable
+ anyway), which makes your kernel slightly smaller and
+ simpler. If unsure, say Y.
config KMOD
bool "Kernel module loader"
diff --git a/init/main.c b/init/main.c
index 2ee1570ec73d..39d3522d3750 100644
--- a/init/main.c
+++ b/init/main.c
@@ -406,9 +406,6 @@ asmlinkage void __init start_kernel(void)
* this. But we do want output early, in case something goes wrong.
*/
console_init();
-#ifdef CONFIG_MODULES
- init_modules();
-#endif
profile_init();
kmem_cache_init();
local_irq_enable();
@@ -457,6 +454,8 @@ asmlinkage void __init start_kernel(void)
struct task_struct *child_reaper = &init_task;
+extern initcall_t __initcall_start, __initcall_end;
+
static void __init do_initcalls(void)
{
initcall_t *call;