From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934015AbcJURqs (ORCPT ); Fri, 21 Oct 2016 13:46:48 -0400 Received: from foss.arm.com ([217.140.101.70]:50730 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933068AbcJURqp (ORCPT ); Fri, 21 Oct 2016 13:46:45 -0400 Subject: Re: Disabling an interrupt in the handler locks the system up To: Mason , Thomas Gleixner References: <580A4460.2090306@free.fr> Cc: LKML , Linux ARM , Sebastian Frias From: Marc Zyngier X-Enigmail-Draft-Status: N1110 Organization: ARM Ltd Message-ID: Date: Fri, 21 Oct 2016 18:46:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.2.0 MIME-Version: 1.0 In-Reply-To: <580A4460.2090306@free.fr> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/10/16 17:37, Mason wrote: > Hello, > > On my platform, one HW block pulls the interrupt line high > as long as it remains idle, and low when it is busy. > > The device tree node is: > > test@22222 { > compatible = "vendor,testme"; > interrupts = <23 IRQ_TYPE_LEVEL_HIGH>; > }; I assume that this is for the sake of the discussion, and that you do not actually intend to put together such a monstrosity. > > I wrote a minimal driver which registers the irq. > And in the interrupt handler, I disable said irq. > > Since the irq is IRQ_TYPE_LEVEL_HIGH, it will fire as soon as > it is registered (because the block is idle). > > Here is the code I've been running, request_irq doesn't return. [...] > And here's what I get when I try to load the module: > (I'm using the default CONFIG_RCU_CPU_STALL_TIMEOUT=21) [...] > Are we not supposed to disable the irq in the handler? You can. It then depends on what your interrupt controller does to actually ensure that the interrupt is disabled. Only you can trace it on your HW to find out. Thanks, M. -- Jazz is not dead. It just smells funny... From mboxrd@z Thu Jan 1 00:00:00 1970 From: marc.zyngier@arm.com (Marc Zyngier) Date: Fri, 21 Oct 2016 18:46:42 +0100 Subject: Disabling an interrupt in the handler locks the system up In-Reply-To: <580A4460.2090306@free.fr> References: <580A4460.2090306@free.fr> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 21/10/16 17:37, Mason wrote: > Hello, > > On my platform, one HW block pulls the interrupt line high > as long as it remains idle, and low when it is busy. > > The device tree node is: > > test at 22222 { > compatible = "vendor,testme"; > interrupts = <23 IRQ_TYPE_LEVEL_HIGH>; > }; I assume that this is for the sake of the discussion, and that you do not actually intend to put together such a monstrosity. > > I wrote a minimal driver which registers the irq. > And in the interrupt handler, I disable said irq. > > Since the irq is IRQ_TYPE_LEVEL_HIGH, it will fire as soon as > it is registered (because the block is idle). > > Here is the code I've been running, request_irq doesn't return. [...] > And here's what I get when I try to load the module: > (I'm using the default CONFIG_RCU_CPU_STALL_TIMEOUT=21) [...] > Are we not supposed to disable the irq in the handler? You can. It then depends on what your interrupt controller does to actually ensure that the interrupt is disabled. Only you can trace it on your HW to find out. Thanks, M. -- Jazz is not dead. It just smells funny...