Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753237AbYJ1REs (ORCPT ); Tue, 28 Oct 2008 13:04:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751521AbYJ1REk (ORCPT ); Tue, 28 Oct 2008 13:04:40 -0400 Received: from casper.infradead.org ([85.118.1.10]:35948 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751092AbYJ1REj (ORCPT ); Tue, 28 Oct 2008 13:04:39 -0400 Subject: Re: [patch 2.6.28-rc2] at91_mci: workaround lockdep From: Peter Zijlstra To: David Brownell Cc: Pierre Ossman , lkml , Ingo Molnar , Russell King , Nicolas Ferre , Andrew Victor , Thomas Gleixner In-Reply-To: <200810271426.27110.david-b@pacbell.net> References: <200810271426.27110.david-b@pacbell.net> Content-Type: text/plain Date: Tue, 28 Oct 2008 18:04:02 +0100 Message-Id: <1225213442.15763.20.camel@lappy.programming.kicks-ass.net> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1880 Lines: 34 On Mon, 2008-10-27 at 14:26 -0700, David Brownell wrote: > From: David Brownell > > Lockdep reported a problem in the at91_mci driver ... in this case, the > issue is with lockdep, not with the driver. A trimmed stack dump, from > trying to boot with root on MMC, shows: > > WARNING: at kernel/lockdep.c:2195 trace_hardirqs_on_caller+0xf4/0x170() > Modules linked in: > [] (trace_hardirqs_on+0x0/0x18) from [] (_spin_unlock_irq+0x2c/0x3c) > [] (_spin_unlock_irq+0x0/0x3c) from [] (flush_dcache_page+0x114/0x144) > [] (flush_dcache_page+0x0/0x144) from [] (at91_mci_irq+0x150/0x414) > [] (at91_mci_irq+0x0/0x414) from [] (handle_IRQ_event+0x2c/0x6c) > [] (handle_IRQ_event+0x0/0x6c) from [] (handle_level_irq+0x108/0x124) > [] (handle_level_irq+0x0/0x124) from [] (__exception_text_start+0x64/0x90) > > When __flush_dcache_aliases() returns -- inlined into flush_dcache_page(), > above -- it re-enables IRQs ... since that evidently may only be called with > IRQs enabled. That's OK since the (unshared) IRQ handler doesn't ask for IRQs > to be disabled. Except ... that lockdep went and disabled them, then went on > to complains about the breakage *it* caused! > > Workaround: depend on LOCKDEP=n ... and for paranoia, disable IRQF_SHARED > for this interrupt. (At the hardware level, this is dedicated to MCI, so > there's never a need for multiple handlers.) In all previous such cases it was deemed the IRQ handler should deal with whatever it gets. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/