lkml.org 
[lkml]   [2008]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] Better interface for hooking early initcalls.
On Tue, 17 Jun 2008 10:07:42 -0400
Mathieu Desnoyers <compudj@krystal.dyndns.org> wrote:

> I am not sure it's worth it trying to define a generic "early"
> initcall, since definition of "how early it is" may change with time.
>
> Currently, it's earlier than SMP init, but later on, it could become
> earlier than mm init. If there are only few users of this, and given
> that they must be designed "knowing" how early they are initialized
> wrt other subsystems, I think it would make sense to call them
> directly from the init code without putting them in a "early
> initcall" category.

I designed this to be "same as other core initcalls, but before SMP".
This isn't a replacement we could use for very early code, such as
kmem_cache_init(). Take into account that CPU hotplug requires this, as
stated in the docs, I quote:
> You need to call register_cpu_notifier() from your init function.
> Init functions could be of two types:
> 1. early init (init function called when only the boot processor is online).
> 2. late init (init function called _after_ all the CPUs are online).

> why not do_one_initcall(*call); ?

I haven't actually tried do_one_initcall() at that point, but it seemed
it messed up with preemption and IRQs. Will check and see if causes any
problems and resubmit if it works. But you do have a point, debugging
should be doable for these initcalls too.

> Mathieu
>


\
 
 \ /
  Last update: 2008-06-17 16:29    [W:0.038 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site