From: tip-bot for Ming Lei <tom.leiming@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
torvalds@linux-foundation.org, a.p.zijlstra@chello.nl,
akpm@linux-foundation.org, tglx@linutronix.de,
yong.zhang0@gmail.com, tom.leiming@gmail.com, mingo@elte.hu
Subject: [tip:core/locking] init/main.c: Execute lockdep_init() as early as possible
Date: Tue, 6 Dec 2011 01:40:28 -0800 [thread overview]
Message-ID: <tip-73839c5b2eacc15cb0aa79c69b285fc659fa8851@git.kernel.org> (raw)
In-Reply-To: <1321508072-23853-1-git-send-email-tom.leiming@gmail.com>
Commit-ID: 73839c5b2eacc15cb0aa79c69b285fc659fa8851
Gitweb: http://git.kernel.org/tip/73839c5b2eacc15cb0aa79c69b285fc659fa8851
Author: Ming Lei <tom.leiming@gmail.com>
AuthorDate: Thu, 17 Nov 2011 13:34:31 +0800
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 6 Dec 2011 08:16:53 +0100
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>
---
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();
/*
prev parent reply other threads:[~2011-12-06 9:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
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-bot for Ming Lei [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-73839c5b2eacc15cb0aa79c69b285fc659fa8851@git.kernel.org \
--to=tom.leiming@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=yong.zhang0@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).