Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760278AbXK2JF0 (ORCPT ); Thu, 29 Nov 2007 04:05:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755837AbXK2JFI (ORCPT ); Thu, 29 Nov 2007 04:05:08 -0500 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:33586 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755783AbXK2JFH (ORCPT ); Thu, 29 Nov 2007 04:05:07 -0500 Date: Thu, 29 Nov 2007 09:04:00 +0000 From: Russell King - ARM Linux To: Daniel Walker Cc: Steven Rostedt , Remy Bohmer , RT , linux-kernel , ARM Linux Mailing List , Thomas Gleixner , Ingo Molnar Subject: Re: [PATCH PREEMPT_RT]: On AT91 ARM: GPIO Interrupt handling can/will stall forever Message-ID: <20071129090359.GA14728@flint.arm.linux.org.uk> References: <1196178834.23808.11.camel@imap.mvista.com> <3efb10970711280638l3f57104y8cf9f2e58235c3@mail.gmail.com> <20071128172509.GA30173@flint.arm.linux.org.uk> <20071128200550.GA3494@flint.arm.linux.org.uk> <1196282672.27964.32.camel@imap.mvista.com> <20071128230331.GA31730@flint.arm.linux.org.uk> <1196291955.27964.47.camel@imap.mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1196291955.27964.47.camel@imap.mvista.com> User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2337 Lines: 50 On Wed, Nov 28, 2007 at 03:19:14PM -0800, Daniel Walker wrote: > On Wed, 2007-11-28 at 23:03 +0000, Russell King - ARM Linux wrote: > > On Wed, Nov 28, 2007 at 04:13:07PM -0500, Steven Rostedt wrote: > > > > > > > > > On Wed, 28 Nov 2007, Daniel Walker wrote: > > > > > > > > > > > Ignoring the ARM side of things for a sec, handle_simple_irq() will > > > > mask() the interrupt in the special case that an interrupt is already in > > > > the processes of being handled.. handle_simple_irq() also unmasks when > > > > it finishes handling an interrupt (something real time adds for some > > > > reason) .. > > > > > > > > In terms of threading the irq everything is the same except there is no > > > > unmask() call when the thread finishes .. > > > > > > > > > > OK, to be honest, I never fully understood the concept of this > > > "simple_irq". I figured it was because of the ARM architecture. > > > > If you read what I said compared with what Daniel said, you'll see that > > adding the mask/unmask is _pointless_ because for the case where the > > simple handler should be used, there is _no_ hardware masking available > > except via the parent interrupt signal. > > > > So actually Daniel's argument misses the basic point - that using > > handle_simple_irq for non-simple IRQs is just WRONG. > > Well we've got at least two ARM boards which need the additional unmask > to work correctly with interrupt threading .. So there must be at least > two ARM boards using handle_simple_irq incorrectly .. It sounds like you > would prefer we send patches to move those handle_simple_irq users into > another method ? If you read my explaination of the purpose of handle_simple_irq() you'll see that for the _correct_ case where this handler should be used, the mask and unmask can only be empty. To repeat for the third time - it's for the case where the hardware supplies NO way to mask the interrupt. So adding calls to the mask/unmask methods would be pointless for the correct use case. If you do have the ability to mask, then you should be using the level or edge handlers. - 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/