Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753039AbZK3Os2 (ORCPT ); Mon, 30 Nov 2009 09:48:28 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752557AbZK3Os1 (ORCPT ); Mon, 30 Nov 2009 09:48:27 -0500 Received: from earthlight.etchedpixels.co.uk ([81.2.110.250]:48954 "EHLO www.etchedpixels.co.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752154AbZK3Os0 (ORCPT ); Mon, 30 Nov 2009 09:48:26 -0500 Date: Mon, 30 Nov 2009 14:47:02 +0000 From: Alan Cox To: Thomas Gleixner Cc: Peter Zijlstra , Uwe =?ISO-8859-14?B?S2xlaW5l?= =?ISO-8859-14?B?LUv2bmln?= , LKML , Linus Torvalds , David Brownell , Andrew Morton , Ingo Molnar , Nicolas Pitre , Eric Miao , John Stultz , Rusty Russell , Remy Bohmer , Hugh Dickins , Andrea Gallo , Jamie Lokier , linux-arm-kernel@lists.infradead.org, Benjamin Herrenschmidt Subject: Re: Get rid of IRQF_DISABLED - (was [PATCH] genirq: warn about IRQF_SHARED|IRQF_DISABLED) Message-ID: <20091130144702.14bea0ee@lxorguk.ukuu.org.uk> In-Reply-To: References: <1259356206-14843-1-git-send-email-u.kleine-koenig@pengutronix.de> <1259578067-29169-1-git-send-email-u.kleine-koenig@pengutronix.de> <1259589780.26472.18.camel@laptop> X-Mailer: Claws Mail 3.7.3 (GTK+ 2.14.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1673 Lines: 38 On Mon, 30 Nov 2009 15:24:40 +0100 (CET) Thomas Gleixner wrote: > On Mon, 30 Nov 2009, Peter Zijlstra wrote: > > On Mon, 2009-11-30 at 14:54 +0100, Thomas Gleixner wrote: > > > The correct solution IMNSHO is to get rid of IRQF_DISABLED and run > > > interrupt handlers always with interrupts disabled and require them > > > not to reenable interrupts themself. > > > > > > Thoughts ? > > > > I'm all for removing that brain damage: > > > > http://lkml.org/lkml/2009/3/2/33 > > Darn, I knew that we discussed that before, but my memory tricked me > into believing that it was years ago :) Well the patch listed there is utterly bogus and will cause hangs at startup. The problem case is IRQF_SHARED|IRQF_DISABLED. The patch messes up all the unshared cases too - and lots of non sharable IRQ hardware just jams the IRQ line high until you beat it into sense (8530's are notorious for getting into that kind of state at init for example). You can't simply remove the disabled from those drivers, you need to be able to allocate a non-shared IRQ, and then enable it or do major driver restructuring of obscure old driver code. SHARED|DISABLED ought to WARN_ON() and if that doesn't motivate people then return -EINVAL. And with any luck that'll prove 6 months later that most of the offenders are not used and we can delete them wholesale. DISABLE without SHARED is fine, and saves waking the dead. -- 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/