From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell King Subject: Re: start_kernel(): bug: interrupts were enabled early Date: Wed, 31 Mar 2010 22:05:55 +0100 Message-ID: <20100331210555.GA17715@flint.arm.linux.org.uk> References: <20100325194100.GA2364@debian> <20100331134048.da4e35a7.akpm@linux-foundation.org> <4BB3B4DB.7040904@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <4BB3B4DB.7040904@kernel.org> Sender: linux-kernel-owner@vger.kernel.org To: Yinghai Lu Cc: Andrew Morton , Rabin Vincent , lkml , hpa@zytor.com, penberg@cs.helsinki.fi, cl@linux-foundation.org, Benjamin Herrenschmidt , linux-arch@vger.kernel.org List-Id: linux-arch.vger.kernel.org On Wed, Mar 31, 2010 at 01:47:23PM -0700, Yinghai Lu wrote: > On 03/31/2010 01:40 PM, Andrew Morton wrote: > > 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? We use the standard generic kernel implementation. Is x86 different? ;) -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from caramon.arm.linux.org.uk ([78.32.30.218]:54479 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758146Ab0CaVJA (ORCPT ); Wed, 31 Mar 2010 17:09:00 -0400 Date: Wed, 31 Mar 2010 22:05:55 +0100 From: Russell King Subject: Re: start_kernel(): bug: interrupts were enabled early Message-ID: <20100331210555.GA17715@flint.arm.linux.org.uk> References: <20100325194100.GA2364@debian> <20100331134048.da4e35a7.akpm@linux-foundation.org> <4BB3B4DB.7040904@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BB3B4DB.7040904@kernel.org> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Yinghai Lu Cc: Andrew Morton , Rabin Vincent , lkml , hpa@zytor.com, penberg@cs.helsinki.fi, cl@linux-foundation.org, Benjamin Herrenschmidt , linux-arch@vger.kernel.org Message-ID: <20100331210555.3QcYHLLQb7vW4N5BlnSmQukDBco7iScPp8KqGTTU8eY@z> On Wed, Mar 31, 2010 at 01:47:23PM -0700, Yinghai Lu wrote: > On 03/31/2010 01:40 PM, Andrew Morton wrote: > > 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? We use the standard generic kernel implementation. Is x86 different? ;) -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: