Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755754Ab0DUR2M (ORCPT ); Wed, 21 Apr 2010 13:28:12 -0400 Received: from tex.lwn.net ([70.33.254.29]:52300 "EHLO vena.lwn.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753671Ab0DUR2K (ORCPT ); Wed, 21 Apr 2010 13:28:10 -0400 Date: Wed, 21 Apr 2010 11:28:07 -0600 From: Jonathan Corbet To: Will Newton Cc: Linux Kernel list , Thomas Gleixner Subject: Re: Threaded irq handler question Message-ID: <20100421112807.5eca9f9d@bike.lwn.net> In-Reply-To: References: Organization: LWN.net X-Mailer: Claws Mail 3.7.5 (GTK+ 2.20.0; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 977 Lines: 21 On Wed, 21 Apr 2010 17:35:32 +0100 Will Newton wrote: > My problem is that this structure does not work, because once I call > disable_irq_nosync() on the irq in the check handler the thread will > no longer run because the irq is disabled. However if I don't call > disable_irq_nosync() I will get endless irqs because the line is > level-triggered and will not be deasserted until the thread has run. Trying to disable IRQs at this level is the wrong approach. You need to do enough in the primary interrupt handler to cause the hardware to stop interrupting in the first place; usually that's just a matter of some sort of acknowledgment. Then the threaded handler can move data around in peace. jon -- 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/