All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linuxppc-dev list <linuxppc-dev@ozlabs.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH] genirq: fix set_irq_type() when recording trigger type
Date: Tue, 21 Oct 2008 09:23:40 +0200	[thread overview]
Message-ID: <20081021072340.GA25136@elte.hu> (raw)
In-Reply-To: <1224570730.7654.242.camel@pasglop>


* Benjamin Herrenschmidt <benh@kernel.crashing.org> 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 <dbrownell@users.sourceforge.net>
> > AuthorDate: Wed Oct 1 14:46:18 2008 -0700
> > Committer:  Ingo Molnar <mingo@elte.hu>
> > CommitDate: Thu Oct 2 10:24:09 2008 +0200
[...]
> > Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> > Acked-by: Thomas Gleixner <tglx@linutronix.de>
> > Signed-off-by: Ingo Molnar <mingo@elte.hu>
> 
> 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 <cfriesen@nortel.com>
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 <cfriesen@nortel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 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;
 }

WARNING: multiple messages have this Message-ID (diff)
From: Ingo Molnar <mingo@elte.hu>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	David Brownell <dbrownell@users.sourceforge.net>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linuxppc-dev list <linuxppc-dev@ozlabs.org>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: [PATCH] genirq: fix set_irq_type() when recording trigger type
Date: Tue, 21 Oct 2008 09:23:40 +0200	[thread overview]
Message-ID: <20081021072340.GA25136@elte.hu> (raw)
In-Reply-To: <1224570730.7654.242.camel@pasglop>


* Benjamin Herrenschmidt <benh@kernel.crashing.org> 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 <dbrownell@users.sourceforge.net>
> > AuthorDate: Wed Oct 1 14:46:18 2008 -0700
> > Committer:  Ingo Molnar <mingo@elte.hu>
> > CommitDate: Thu Oct 2 10:24:09 2008 +0200
[...]
> > Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> > Acked-by: Thomas Gleixner <tglx@linutronix.de>
> > Signed-off-by: Ingo Molnar <mingo@elte.hu>
> 
> 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 <cfriesen@nortel.com>
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 <cfriesen@nortel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 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;
 }

  parent reply	other threads:[~2008-10-21  7:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200810202205.m9KM5une024759@hera.kernel.org>
2008-10-21  6:32 ` Bug in "genirq: record trigger type" Benjamin Herrenschmidt
2008-10-21  6:32   ` Benjamin Herrenschmidt
2008-10-21  7:22   ` Yinghai Lu
2008-10-21  7:22     ` Yinghai Lu
2008-10-21  7:28     ` Ingo Molnar
2008-10-21  7:28       ` Ingo Molnar
2008-10-21  7:32       ` Benjamin Herrenschmidt
2008-10-21  7:32         ` Benjamin Herrenschmidt
2008-10-21  7:33         ` Ingo Molnar
2008-10-21  7:33           ` Ingo Molnar
2008-10-21  7:23   ` Ingo Molnar [this message]
2008-10-21  7:23     ` [PATCH] genirq: fix set_irq_type() when recording trigger type Ingo Molnar
2008-10-21  8:01   ` Bug in "genirq: record trigger type" David Brownell
2008-10-21  8:01     ` David Brownell
2008-10-21  8:29     ` Benjamin Herrenschmidt
2008-10-21  8:29       ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081021072340.GA25136@elte.hu \
    --to=mingo@elte.hu \
    --cc=benh@kernel.crashing.org \
    --cc=dbrownell@users.sourceforge.net \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.