From: Dominik Brodowski <linux@brodo.de>
To: Jeff Garzik <jgarzik@pobox.com>, rmk@arm.linux.org.uk
Cc: linux-kernel@vger.kernel.org, kai@tp1.ruhr-uni-bochum.de
Subject: Re: Initcall / device model meltdown?
Date: Fri, 17 Jan 2003 21:48:58 +0100 [thread overview]
Message-ID: <20030117204858.GA2359@brodo.de> (raw)
In-Reply-To: <3104.1042835842@www5.gmx.net>
On Fri, Jan 17, 2003 at 09:37:22PM +0100, Jeff Garzik wrote:
> On Fri, Jan 17, 2003 at 07:23:56PM +0000, Russell King wrote:
> > 1. the device model requires a certain initialisation order.
> > 2. modules need to use module_init() which means the initialisation order
> > is link-order dependent, despite our multi-level initialisation system.
modules don't really need module_init() -- you can use the others, too:
in include/linux/init.h:
/* Don't use these in modules, but some people do... */
#define core_initcall(fn) module_init(fn)
#define postcore_initcall(fn) module_init(fn)
#define arch_initcall(fn) module_init(fn)
#define subsys_initcall(fn) module_init(fn)
#define fs_initcall(fn) module_init(fn)
#define device_initcall(fn) module_init(fn)
#define late_initcall(fn) module_init(fn)
So it makes sense to use the appropriate initcall level even in files that
can be compiled as modules, these #defines do their work for you. We should
update that comment, though.
Dominik
--- linux-original/include/linux/init.h 2003-01-17 16:51:23.000000000 +0100
+++ linux/include/linux/init.h 2003-01-17 21:46:34.000000000 +0100
@@ -129,7 +129,10 @@
#else /* MODULE */
-/* Don't use these in modules, but some people do... */
+/* Alternatively, you can still use these initcall levels to
+ * ensure proper initialization order when modularized stuff
+ * is compiled into the kernel.
+ */
#define core_initcall(fn) module_init(fn)
#define postcore_initcall(fn) module_init(fn)
#define arch_initcall(fn) module_init(fn)
next prev parent reply other threads:[~2003-01-17 20:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-17 19:23 Initcall / device model meltdown? Russell King
2003-01-17 19:32 ` Jeff Garzik
[not found] ` <3104.1042835842@www5.gmx.net>
2003-01-17 20:48 ` Dominik Brodowski [this message]
2003-01-17 19:56 ` Kai Germaschewski
2003-01-17 20:14 ` Russell King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030117204858.GA2359@brodo.de \
--to=linux@brodo.de \
--cc=jgarzik@pobox.com \
--cc=kai@tp1.ruhr-uni-bochum.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.