Thread (3 messages) 3 messages, 3 authors, 2011-08-08

xx_initcall ( ) in kernel

From: subin gangadharan <hidden>
Date: 2011-08-08 16:09:50

On Wed, Jul 13, 2011 at 4:09 AM, nilesh [off-list ref] wrote:
Hi Sumeet,

On Wednesday 13 July 2011 04:12 PM, sumeet linux wrote:
quoted
Dear friends,

I want to know the basics xx_initcall ( ) in linux kernel. How this
function
quoted
works ?
Observed in kernel code, many places late_initcall ( ), early_initcall (
),
quoted
arch_initcall ( ), core_initcall ( ) gets called.
When did all these functions gets call during kernel initialization ?
I am more interested in what is the sequence of these functions gets
called
quoted
one after another.
I could get a nice link explaining about *_initcall(). Refer:

http://book.opensourceproject.org.cn/embedded/embeddedprime/opensource/0136130550/ch05lev1sec4.html

*_initcall() are macros which set the function pointers for subsystem
initialization (typedef int (*initcall_t)(void) : typedef of all such
function pointers).
Also if we look at the source code, the functions are called in below
sequence:
http://lxr.linux.no/#linux+v2.6.39/init/main.c#L695

do_basic_setup(void) -> do_initcalls(void) -> do_one_initcall(*fn);
do_one_initcall(*fn) - calls each function. And do_basic_setup() is
called inside the initialization sequence (kernel_init()).
quoted
Thank you.

Regards,
Sumeet
--
Thanks,
Nilesh

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
  Hi,

 I hope this will help you to get a basic understanding of init call.
 http://www.embedded-bits.co.uk/2008/init-call-mechanism/
-- 
With Regards
Subin Gangadharan

Everything should be made as simple as possible,but not simpler.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110808/439e0978/attachment.html 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help