RE: early_initcall

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
> Ashlesha Shintre wrote:
> 
> Hi,
> 
> I m using the 2.6.14.6 tree and trying to get the kernel 
> running on the
> Encore M3 board.  
> 
> The kernel crashes during the boot process at the 
> early_initcall.

What is the exact output from the crash?

> This function doesnt seem to be defined anywhere.

It's not a function, but a macro. The macro is used to annotate a
function as being among the list of functions that are called at startup
by the "initcall" mechanism: a big loop that sweeps over a symbol table
of registered initialization functions and calls them. E.g.

  #include <linux/init.h>

  /* ... */

  int __init my_initialization_function(void)
  {
    printk(KERN_INFO "Hello, world\n");
  }

  early_initcall(my_initialization_function);

The __init tells the kernel build system that your function is not
needed after initialization and its memory can be thrown away. The
early_initcall arranges for the initialization call. Early means that
it's in the first group of functions.

If you suspect your kernel is dying during the calling of the initcall
functions, you can turn on initcall debugging. Add these parameters to
your kernel command line:

   debug debug_initcall

Hope this helps.



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux