[<prev] [next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0705010123240.2733@scrub.home>
Date: Tue, 1 May 2007 01:30:53 +0200 (CEST)
From: Roman Zippel <zippel@...ux-m68k.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: [PATCH] Allow arch to initialize arch field of the module structure
Hi,
This will later allow an arch to add module specific information via
linker generated tables instead of poking directly in the module object
structure.
Signed-off-by: Roman Zippel <zippel@...ux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
---
include/linux/module.h | 3 +++
scripts/mod/modpost.c | 1 +
2 files changed, 4 insertions(+)
Index: linux-2.6/include/linux/module.h
===================================================================
--- linux-2.6.orig/include/linux/module.h
+++ linux-2.6/include/linux/module.h
@@ -356,6 +356,9 @@ struct module
keeping pointers to this stuff */
char *args;
};
+#ifndef MODULE_ARCH_INIT
+#define MODULE_ARCH_INIT {}
+#endif
/* FIXME: It'd be nice to isolate modules during init, too, so they
aren't used before they (may) fail. But presently too much code
Index: linux-2.6/scripts/mod/modpost.c
===================================================================
--- linux-2.6.orig/scripts/mod/modpost.c
+++ linux-2.6/scripts/mod/modpost.c
@@ -1249,6 +1249,7 @@ static void add_header(struct buffer *b,
buf_printf(b, "#ifdef CONFIG_MODULE_UNLOAD\n"
" .exit = cleanup_module,\n"
"#endif\n");
+ buf_printf(b, " .arch = MODULE_ARCH_INIT,\n");
buf_printf(b, "};\n");
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists