linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] init/main.c: execute lockdep_init as early as possible
@ 2011-11-17  5:34 tom.leiming
  2011-11-17  5:34 ` [PATCH 2/2] lockdep: print lock name for lockdep_init_error tom.leiming
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: tom.leiming @ 2011-11-17  5:34 UTC (permalink / raw)
  To: mingo, a.p.zijlstra; +Cc: linux-kernel, Ming Lei

From: Ming Lei <tom.leiming@gmail.com>

This patch removes the lockdep warning[1] on ARM platform.
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 make printk can be called as early
as possible without lockdep complainment.

[1], lockdep warning
[    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

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
---
 init/main.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

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();
 
 	/*
-- 
1.7.5.4


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

end of thread, other threads:[~2011-12-06  9:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-17  5:34 [PATCH 1/2] init/main.c: execute lockdep_init as early as possible tom.leiming
2011-11-17  5:34 ` [PATCH 2/2] lockdep: print lock name for lockdep_init_error tom.leiming
2011-11-17  6:02   ` Yong Zhang
2011-11-17  8:01     ` Ming Lei
2011-11-17  8:44       ` Yong Zhang
2011-11-17  9:01         ` Peter Zijlstra
2011-11-17 21:50   ` Ryan Mallon
2011-12-06  9:41   ` [tip:core/locking] lockdep: Print lock name in lockdep_init_error() tip-bot for Ming Lei
2011-11-17  5:59 ` [PATCH 1/2] init/main.c: execute lockdep_init as early as possible Yong Zhang
2011-12-06  9:40 ` [tip:core/locking] init/main.c: Execute lockdep_init() " tip-bot for Ming Lei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).