From: Ming Lei Date: Thu, 17 Nov 2011 05:34:31 +0000 (+0800) Subject: init/main.c: Execute lockdep_init() as early as possible X-Git-Tag: v3.3-rc1~196^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=73839c5b2eacc15cb0aa79c69b285fc659fa8851;p=profile%2Fivi%2Fkernel-x86-ivi.git init/main.c: Execute lockdep_init() as early as possible This patch fixes a lockdep warning on ARM platforms: [ 0.000000] WARNING: lockdep init error! Arch code didn't call lockdep_init() early enough? [ 0.000000] Call stack leading to lockdep invocation was: [ 0.000000] [] save_stack_trace_tsk+0x0/0x90 [ 0.000000] [] 0xffffffff The warning is caused by printk inside smp_setup_processor_id(). It is safe to do this because lockdep_init() doesn't depend on smp_setup_processor_id(), so improve things that printk can be called as early as possible without lockdep complaint. Signed-off-by: Ming Lei Reviewed-by: Yong Zhang Signed-off-by: Peter Zijlstra Cc: Linus Torvalds Cc: Andrew Morton Link: http://lkml.kernel.org/r/1321508072-23853-1-git-send-email-tom.leiming@gmail.com Signed-off-by: Ingo Molnar --- diff --git a/init/main.c b/init/main.c index 217ed23..2c76efb 100644 --- a/init/main.c +++ b/init/main.c @@ -469,13 +469,12 @@ asmlinkage void __init start_kernel(void) char * command_line; extern const struct kernel_param __start___param[], __stop___param[]; - smp_setup_processor_id(); - /* * Need to run as early as possible, to initialize the * lockdep hash: */ lockdep_init(); + smp_setup_processor_id(); debug_objects_early_init(); /*