__init() and module_init() serialization of modules?

Parav Pandit paravpandit at yahoo.com
Wed Sep 6 18:43:46 EST 2006


Hi,
   
  My doubt is more related to Linux kernel rather than PPC, but I feel that many will be interested to know this. Please help me to understand a silly doubt.
   
  When we have drivers as kernel modules, it can be loaded using insmod or modprobe.
  We use the depmod utility to generate the module dependancy and so concerned module gets loaded first.
  This is fine.
   
  Now when in comes to in-build module (part of kernel image), we obviously don't run the modprobe and/or depmod because they are no more modules.
   
  So how does - during compilation time, tool chain can identify which module to load first so that do_initcalls() function can take care if it.
   
  e.g. Module A and Module B.
  Both are inbuild, and A uses the functionality of B. So module_init() of B should get called first.
  How this is achieved for in-build modules?
  __init macro takes care of it for freeing that memory after those calls, but how the sequencing is done?
   
  Regards,
  Parav Pandit
   

 		
---------------------------------
Stay in the know. Pulse on the new Yahoo.com.  Check it out. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20060906/20a47c86/attachment.htm 


More information about the Linuxppc-embedded mailing list