From: Yinghai Lu <yinghai@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Rabin Vincent <rabin@rab.in>, lkml <linux-kernel@vger.kernel.org>,
hpa@zytor.com, penberg@cs.helsinki.fi, cl@linux-foundation.org,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
linux-arch@vger.kernel.org
Subject: Re: start_kernel(): bug: interrupts were enabled early
Date: Wed, 31 Mar 2010 13:47:23 -0700 [thread overview]
Message-ID: <4BB3B4DB.7040904@kernel.org> (raw)
In-Reply-To: <20100331134048.da4e35a7.akpm@linux-foundation.org>
On 03/31/2010 01:40 PM, Andrew Morton wrote:
> On Fri, 26 Mar 2010 01:11:00 +0530
> Rabin Vincent <rabin@rab.in> wrote:
>
>> > On latest git, I'm seeing "start_kernel(): bug: interrupts were enabled
>> > early" messages on ARM (sample log below).
>> >
>> > This appears to be caused by:
>> >
>> > start_kernel -> radix_tree_init -> kmem_cache_create (slub) ->
>> > down_write -> __down_write (lib/rwsem-spinlock.c) -> spin_unlock_irq
>> >
>> > radix_tree_init was moved earlier by:
>> >
>> > commit 773e3eb7b81e5ba13b5155dfb3bb75b8ce37f8f9
>> > Author: Yinghai Lu <yinghai@kernel.org>
>> > Date: Wed Feb 10 01:20:33 2010 -0800
>> >
>> > init: Move radix_tree_init() early
>> >
>> > Prepare for using radix trees in early_irq_init().
>> >
>> > Signed-off-by: Yinghai Lu <yinghai@kernel.org>
>> > LKML-Reference: <1265793639-15071-30-git-send-email-yinghai@kernel.org>
>> > Signed-off-by: H. Peter Anvin <hpa@zytor.com>
>> >
> That's going to be hard to fix.
>
> Once upon a time, enabling interrupts too early in boot would kill
> powerpc boxes stone dead. From the lack of noise I assume that this is
> not happening in current kernels for some reason.
>
> We have two checks in start_kernel():
>
> if (!irqs_disabled()) {
> printk(KERN_WARNING "start_kernel(): bug: interrupts were "
> "enabled *very* early, fixing it\n");
> local_irq_disable();
> }
> rcu_init();
> radix_tree_init();
> /* init some links before init_ISA_irqs() */
> early_irq_init();
> init_IRQ();
> prio_tree_init();
> init_timers();
> hrtimers_init();
> softirq_init();
> timekeeping_init();
> time_init();
> profile_init();
> if (!irqs_disabled())
> printk(KERN_CRIT "start_kernel(): bug: interrupts were "
> "enabled early\n");
>
> perhaps the second one isn't needed? Perhaps no architecture requires
> that local interrupts be disabled across the above initialisations?
spin_unlock_irq from arm is different from other archs?
YH
next prev parent reply other threads:[~2010-03-31 20:49 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-25 19:41 start_kernel(): bug: interrupts were enabled early Rabin Vincent
2010-03-31 20:40 ` Andrew Morton
2010-03-31 20:47 ` Yinghai Lu [this message]
2010-03-31 20:52 ` Andrew Morton
2010-03-31 21:12 ` H. Peter Anvin
2010-03-31 21:28 ` Andrew Morton
2010-03-31 22:35 ` Benjamin Herrenschmidt
2010-04-01 16:13 ` Linus Torvalds
2010-04-01 14:27 ` Andrew Morton
2010-04-01 20:12 ` Linus Torvalds
2010-04-02 14:46 ` David Howells
2010-04-02 14:54 ` Linus Torvalds
2010-04-07 19:09 ` Kevin Hilman
2010-04-08 15:55 ` Américo Wang
2010-03-31 21:01 ` Matthew Wilcox
2010-03-31 21:05 ` H. Peter Anvin
2010-03-31 21:17 ` Matthew Wilcox
2010-03-31 21:42 ` Christoph Lameter
2010-03-31 21:54 ` Russell King
2010-03-31 21:57 ` H. Peter Anvin
2010-03-31 22:30 ` Russell King
2010-03-31 22:37 ` Benjamin Herrenschmidt
2010-03-31 22:49 ` Andrew Morton
2010-04-01 1:17 ` Benjamin Herrenschmidt
2010-03-31 22:26 ` Andrew Morton
2010-04-01 6:26 ` H. Peter Anvin
2010-04-01 3:33 ` Andrew Morton
2010-04-01 6:48 ` Benjamin Herrenschmidt
2010-04-01 16:15 ` H. Peter Anvin
2010-04-01 11:06 ` David Howells
2010-04-01 15:55 ` Christoph Lameter
2010-04-01 23:00 ` Benjamin Herrenschmidt
2010-04-01 6:50 ` Benjamin Herrenschmidt
2010-03-31 22:36 ` Benjamin Herrenschmidt
2010-04-01 15:57 ` Christoph Lameter
2010-03-31 21:05 ` Russell King
2010-03-31 21:08 ` H. Peter Anvin
2010-03-31 22:31 ` Benjamin Herrenschmidt
2010-03-31 22:36 ` H. Peter Anvin
2010-03-31 22:58 ` David Howells
2010-04-01 9:41 ` Jamie Lokier
2010-04-01 11:23 ` Matthew Wilcox
2010-04-01 10:50 ` David Howells
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=4BB3B4DB.7040904@kernel.org \
--to=yinghai@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=cl@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
--cc=rabin@rab.in \
/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).