From: "Amol Lad" <amol.lad@gmail.com>
To: fundu_1999@yahoo.com
Cc: linux-embedded@vger.kernel.org
Subject: Re: Module init for compiled in vs loaded modules
Date: Tue, 19 Aug 2008 09:59:12 +0530 [thread overview]
Message-ID: <8c675e9b0808182129q320a0d5as487c5034e3fa67c6@mail.gmail.com> (raw)
In-Reply-To: <970019.41811.qm@web63401.mail.re1.yahoo.com>
Code base of 2.6.18
>
> 1) But where do i look to find how the kernel loads(ie. calls the fn exported by module_init(XXXX)) for modules compiled into the kernel.
linux/init.h:
#ifndef MODULE
...
#define module_init(x) __initcall(x);
#define __initcall(fn) device_initcall(fn)
#define device_initcall(fn) __define_initcall("6",fn)
#define __define_initcall(level,fn) \
static initcall_t __initcall_##fn __attribute_used__ \
__attribute__((__section__(".initcall" level ".init"))) = fn
...
#endif
So as you can see call to module_init is actually an initcall.
initcalls are processed in do_initcalls function in init/main.c
static void __init do_basic_setup(void)
{
....
do_initcalls();
}
>
> thanks !
Amol
>
>
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2008-08-19 4:29 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-30 2:18 embedded rootfs utility Behan Webster
2008-07-30 14:09 ` Grant Likely
2008-07-30 15:12 ` Marco Stornelli
2008-07-30 15:40 ` Behan Webster
2008-08-06 11:50 ` Geert Uytterhoeven
2008-08-08 17:03 ` Behan Webster
2008-08-14 6:29 ` Grant Likely
2008-08-14 14:35 ` Behan Webster
2008-08-14 16:35 ` Grant Likely
2008-08-14 19:20 ` Behan Webster
2008-08-14 19:25 ` Grant Likely
2008-08-14 19:32 ` Behan Webster
2008-08-18 11:30 ` Geert Uytterhoeven
2008-08-18 16:00 ` Grant Likely
2008-08-19 1:44 ` Module init for compiled in vs loaded modules Fundu
2008-08-19 4:29 ` Amol Lad [this message]
2008-08-19 16:11 ` T Ziomek
2008-08-10 15:14 ` embedded rootfs utility Michelle Konzack
2008-08-24 16:14 ` Behan Webster
2008-09-17 18:13 ` ELBS mindshare Grant Likely
2008-09-17 18:23 ` Robert Schwebel
2008-09-17 19:48 ` Bill Traynor
2008-09-17 20:27 ` Robert Schwebel
2008-09-17 22:09 ` Grant Likely
2008-09-20 19:20 ` Michelle Konzack
-- strict thread matches above, loose matches on Subject: below --
2008-08-19 17:26 Module init for compiled in vs loaded modules Fundu
2008-08-20 9:06 ` Geert Uytterhoeven
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=8c675e9b0808182129q320a0d5as487c5034e3fa67c6@mail.gmail.com \
--to=amol.lad@gmail.com \
--cc=fundu_1999@yahoo.com \
--cc=linux-embedded@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).