Re: early_initcall

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

 



On Wed, Sep 06, 2006 at 11:10:47AM -0700, Ashlesha Shintre wrote:

> I googled early_initcall and found a patch which basically adds this
> line to the /include/init.h file:
> 
> #define early_initcall(fn)             __define_initcall(".early1",fn)

There is more infrastructure needed to get this to work.  And in fact why
are you trying to get it to work at all - a direct call from setup_arch
to your early init function is trivial to do.

> I built a kernel image with this new line included and now if I try
> executing it, the bootloader YAMON gives an exception error before it
> can even begin!  Here is the dump:

Such a dump could be from YAMON or in the very early phase of the kernel
initialization.

> A machine check means that an exception is generated due to duplicate
> TLB entries.  I dont understand why the kernel crashes so early.

There are also other implementation specified reasons that may result
in a machine check exception as well.

> Also, what does the ".early1" mean? Is that a definition of a different
> segment in the init.h file?

Section not segment.  It's just a section name.

> I checked output of the "readelf -a vmlinux" and found that the address
> for the early_initcall comes up about 5 times.  I m not sure what each
> of the fields mean, so I have attached the above part of the readelf in
> a file called readelf.

And if you had not quoted 50 lines of the previous message in this thread
but those lines from the readelf output we might actually tell you.

  Ralf


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

  Powered by Linux