lkcd
[Top] [All Lists]

Re: LKCD + KDB ? (link/init order)

To: r1vamsi@xxxxxxxxxx
Subject: Re: LKCD + KDB ? (link/init order)
From: Keith Owens <kaos@xxxxxxxxxx>
Date: Wed, 05 Sep 2001 16:50:14 +1000
Cc: lkcd@xxxxxxxxxxx
In-reply-to: Your message of "Wed, 05 Sep 2001 11:12:59 +0530." <CA256ABE.001C59E7.00@xxxxxxxxxxxxxxxxxxx>
Sender: owner-lkcd@xxxxxxxxxxx
On Wed, 5 Sep 2001 11:12:59 +0530, 
r1vamsi@xxxxxxxxxx wrote:
>Lkcd could very well register kdb command and do what ever. However, when
>lkcd is linked into the kernel (which is the case most of the time), how
>can it be sure that kdb is initialized before lkcd's init (where in it
>could call kdb_register()) ?

kdb is initialized just after mem_init(), in init/main.c::start_kernel().
If lkcd is called from start_kernel() then call it after kdb.  If lkcd
uses __initcall then it is initialized long after kdb has started.

>Is there any other way to ensure correct ordering of init calls, besides
>linking the objects in the desired sequence in the Makefiles?

Either hand code the call sequence in start_kernel() or use __initcall
and control the init order using the link order in the makefiles.
Those are the only two choices.


<Prev in Thread] Current Thread [Next in Thread>