All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: early_initcall
@ 2006-09-02  0:50 ` Kaz Kylheku
  0 siblings, 0 replies; 8+ messages in thread
From: Kaz Kylheku @ 2006-09-02  0:50 UTC (permalink / raw)
  To: linux-mips

 
> 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.

^ permalink raw reply	[flat|nested] 8+ messages in thread
* early_initcall
@ 2006-09-01 23:38 Ashlesha Shintre
  0 siblings, 0 replies; 8+ messages in thread
From: Ashlesha Shintre @ 2006-09-01 23:38 UTC (permalink / raw)
  To: linux-mips

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.  This
function doesnt seem to be defined anywhere.  Which is the last version
of the 2.6 tree that still supports the early_initcall?

Thanks,
Ashlesha.

^ permalink raw reply	[flat|nested] 8+ messages in thread
* early_initcall
@ 2004-12-08 14:06 Yoichi Yuasa
  0 siblings, 0 replies; 8+ messages in thread
From: Yoichi Yuasa @ 2004-12-08 14:06 UTC (permalink / raw)
  To: linux-mips

Hi,

Since early_initcall is not defined in generic 2.6.10-rc3,
MIPS has a problem in generic kernel.

I investigated why early_initcall is not defined in generic kernel.
I found a following mail in LKML.

We need to move early_initcall to MIPS-specific header file.
Where do you think is a suitable header file for it?

Yoichi

---- Andrew's comment ----
From: Andrew Morton <akpm@osdl.org>
To: Samium Gromoff <deepfire@sic-elvis.zel.ru>
Cc: linux-kernel@vger.kernel.org, Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [2.6.5][MIPS] oneliners somehow not made it into mainline [3/3]
Date: 	Mon, 12 Apr 2004 14:06:28 -0700
Sender: linux-kernel-owner@vger.kernel.org
X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i586-pc-linux-gnu)

Samium Gromoff <deepfire@sic-elvis.zel.ru> wrote:
>
> Without this one it fails to run the earlyinitcall stuff, and hence
> explodes at some point.
> 
> diff -urN -X './#cdiff.pattern' ./linux-2.6.5/include/linux/init.h ./mc-2.6.5/include/linux/init.h
> --- ./linux-2.6.5/include/linux/init.h  2004-04-12 16:07:45.000000000 +0400
> +++ ./mc-2.6.5/include/linux/init.h     2004-04-12 18:05:28.000000000 +0400
> @@ -83,6 +83,7 @@
>         static initcall_t __initcall_##fn __attribute_used__ \
>         __attribute__((__section__(".initcall" level ".init"))) = fn
> 
> +#define early_initcall(fn)             __define_initcall(".early1",fn)
>  #define core_initcall(fn)              __define_initcall("1",fn)
>  #define postcore_initcall(fn)          __define_initcall("2",fn)
>  #define arch_initcall(fn)              __define_initcall("3",fn)

early_initcall() is a mips-specific thing.  If we add this macro to
<linux/init.h> then someone will use it in generic code and all the other
architectures explode.

We need to either make this entirely mips-private, or rework the mips code
to not use it at all, or justify its introduction and then introduce it for
all architectures.

^ permalink raw reply	[flat|nested] 8+ messages in thread
* early_initcall
@ 2004-04-24  7:59 Stanislaw Skowronek
  0 siblings, 0 replies; 8+ messages in thread
From: Stanislaw Skowronek @ 2004-04-24  7:59 UTC (permalink / raw)
  To: linux-mips

What the hell is that? Nowhere declared and dead as a doornail in 2.6.5.

Stanislaw Skowronek

--<=>--
  Paranoid: one who is truly in touch with reality.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-09-14 21:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-02  0:50 early_initcall Kaz Kylheku
2006-09-02  0:50 ` early_initcall Kaz Kylheku
2006-09-06 18:10 ` early_initcall Ashlesha Shintre
2006-09-07  3:30   ` early_initcall Ralf Baechle
2006-09-14 22:05     ` early_initcall Ashlesha Shintre
  -- strict thread matches above, loose matches on Subject: below --
2006-09-01 23:38 early_initcall Ashlesha Shintre
2004-12-08 14:06 early_initcall Yoichi Yuasa
2004-04-24  7:59 early_initcall Stanislaw Skowronek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.