<div dir="ltr">Hi,<br><div><br><br>On Tue, Jan 8, 2013 at 11:08 AM, Rahul Bedarkar <<a href="mailto:rpal143@gmail.com">rpal143@gmail.com</a>> wrote:<br>><br>> Ok. in init/main.c we call do_basic_setup(). Where do_initcalls call each of init functions from __early_initcall_end to __initcall_end. But I don't know from where these values gets initialized.<br>
<br></div><div>If you look here:<br><a href="http://lxr.linux.no/#linux+v3.7.1/include/linux/init.h#L279">http://lxr.linux.no/#linux+v3.7.1/include/linux/init.h#L279</a><br><br></div><div>module_init is mapped to __initcall, which is in turn mapped to device_initcall, which sets up a pointer in a section called .initcall6.init<br>
<br></div><div>If you then look in the kernel linker script:<br><a href="http://lxr.linux.no/#linux+v3.7.1/arch/arm/kernel/vmlinux.lds.S#L175">http://lxr.linux.no/#linux+v3.7.1/arch/arm/kernel/vmlinux.lds.S#L175</a><br><br>
INIT_CALLS is defined here:<br><a href="http://lxr.linux.no/#linux+v3.7.1/include/asm-generic/vmlinux.lds.h#L633">http://lxr.linux.no/#linux+v3.7.1/include/asm-generic/vmlinux.lds.h#L633</a><br><br></div><div>and it defines the __initcall_start and __initcall_end symbols.<br>
</div><div><br></div>Dave Hylands<br></div>