From patchwork Tue Oct 21 07:23:40 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ingo Molnar X-Patchwork-Id: 5198 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 92DFCDDF26 for ; Tue, 21 Oct 2008 18:24:19 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from mx3.mail.elte.hu (mx3.mail.elte.hu [157.181.1.138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7E018DDDE1 for ; Tue, 21 Oct 2008 18:23:59 +1100 (EST) Received: from elvis.elte.hu ([157.181.1.14]) by mx3.mail.elte.hu with esmtp (Exim) id 1KsBak-0005QF-AF from ; Tue, 21 Oct 2008 09:23:46 +0200 Received: by elvis.elte.hu (Postfix, from userid 1004) id F409A3E21A3; Tue, 21 Oct 2008 09:23:42 +0200 (CEST) Date: Tue, 21 Oct 2008 09:23:40 +0200 From: Ingo Molnar To: Benjamin Herrenschmidt Subject: [PATCH] genirq: fix set_irq_type() when recording trigger type Message-ID: <20081021072340.GA25136@elte.hu> References: <200810202205.m9KM5une024759@hera.kernel.org> <1224570730.7654.242.camel@pasglop> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1224570730.7654.242.camel@pasglop> User-Agent: Mutt/1.5.18 (2008-05-17) Received-SPF: neutral (mx3: 157.181.1.14 is neither permitted nor denied by domain of elte.hu) client-ip=157.181.1.14; envelope-from=mingo@elte.hu; helo=elvis.elte.hu; X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00, DNS_FROM_SECURITYSAGE autolearn=no SpamAssassin version=3.2.3 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] 0.0 DNS_FROM_SECURITYSAGE RBL: Envelope sender in blackholes.securitysage.com Cc: David Brownell , Linux Kernel Mailing List , linuxppc-dev list , "H. Peter Anvin" , Thomas Gleixner , Linus Torvalds X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org * Benjamin Herrenschmidt wrote: > On Mon, 2008-10-20 at 22:05 +0000, Linux Kernel Mailing List wrote: > > Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0c5d1eb77a8be917b638344a22afe1398236482b > > Commit: 0c5d1eb77a8be917b638344a22afe1398236482b > > Parent: d6d5aeb661fc14655c417f3582ae7ec52985d2a8 > > Author: David Brownell > > AuthorDate: Wed Oct 1 14:46:18 2008 -0700 > > Committer: Ingo Molnar > > CommitDate: Thu Oct 2 10:24:09 2008 +0200 [...] > > Signed-off-by: David Brownell > > Signed-off-by: Andrew Morton > > Acked-by: Thomas Gleixner > > Signed-off-by: Ingo Molnar > > This one is obviously broken and breaks booting on a whole bunch of > machines (including powermac's and thus my G5, it's never good when my > own machine breaks !). > > Nice to see 3 SOB's and one Ack and nobody caught the obvious bug :-) that patch came from -mm towards us shortly before the merge window. Once we had it integrated Chris Friesen reported a boot hang on a G5, and there's a fix pending for the bug, see it below. Will send it to Linus expressly. Fortunately only a minority of Linux users will ever run a box that uses set_irq_type() - but yes it needs to be fixed. Ingo ------------------------------> From aac4ddd11a8d0e402ddc3fbc75204cb64efa0aac Mon Sep 17 00:00:00 2001 From: Chris Friesen Date: Mon, 20 Oct 2008 12:41:58 -0600 Subject: [PATCH] genirq: fix set_irq_type() when recording trigger type In set_irq_type() we want to pass the type rather than the current interrupt state. Signed-off-by: Chris Friesen Signed-off-by: Ingo Molnar --- kernel/irq/chip.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 4895fde..3de6ea3 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -127,7 +127,7 @@ int set_irq_type(unsigned int irq, unsigned int type) return 0; spin_lock_irqsave(&desc->lock, flags); - ret = __irq_set_trigger(desc, irq, flags); + ret = __irq_set_trigger(desc, irq, type); spin_unlock_irqrestore(&desc->lock, flags); return ret; }