diff options
author | Ming Lei <tom.leiming@gmail.com> | 2011-11-17 00:34:31 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-12-06 02:16:53 -0500 |
commit | 73839c5b2eacc15cb0aa79c69b285fc659fa8851 (patch) | |
tree | 460e38f3b8036b33a3bed5e4322ea1bb5ef4e3c8 /init/main.c | |
parent | d3d03d4fc5b1bec3a579112de170a9676e9d97cb (diff) |
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] [<c00164bc>] save_stack_trace_tsk+0x0/0x90
[ 0.000000] [<ffffffff>] 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 <tom.leiming@gmail.com>
Reviewed-by: Yong Zhang <yong.zhang0@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/1321508072-23853-1-git-send-email-tom.leiming@gmail.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'init/main.c')
-rw-r--r-- | init/main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/init/main.c b/init/main.c index 217ed23e9487..2c76efb513c2 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -469,13 +469,12 @@ asmlinkage void __init start_kernel(void) | |||
469 | char * command_line; | 469 | char * command_line; |
470 | extern const struct kernel_param __start___param[], __stop___param[]; | 470 | extern const struct kernel_param __start___param[], __stop___param[]; |
471 | 471 | ||
472 | smp_setup_processor_id(); | ||
473 | |||
474 | /* | 472 | /* |
475 | * Need to run as early as possible, to initialize the | 473 | * Need to run as early as possible, to initialize the |
476 | * lockdep hash: | 474 | * lockdep hash: |
477 | */ | 475 | */ |
478 | lockdep_init(); | 476 | lockdep_init(); |
477 | smp_setup_processor_id(); | ||
479 | debug_objects_early_init(); | 478 | debug_objects_early_init(); |
480 | 479 | ||
481 | /* | 480 | /* |