From: Jarek Poplawski <jarkao2@o2.pl>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
Stable Team <stable@kernel.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Jean-Baptiste Vignaud <vignaud@xandmail.fr>,
"marcin\.slusarz" <marcin.slusarz@gmail.com>
Subject: Re: [patch 3/3] genirq: mark io_apic level interrupts to avoid resend
Date: Mon, 13 Aug 2007 13:28:21 +0200 [thread overview]
Message-ID: <20070813112821.GA2863@ff.dom.local> (raw)
In-Reply-To: <20070812152303.177006193@inhelltoy.tec.linutronix.de>
On Sun, Aug 12, 2007 at 03:46:36PM -0000, Thomas Gleixner wrote:
> Level type interrupts do not need to be resent. It was also found that
> some chipsets get confused in case of the resend.
IMHO, it's still not proven the chipsets are to blame here
(plus read below).
>
> Mark the ioapic level type interrupts as such to avoid the resend
> functionality in the generic irq code.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
>
> ---
> arch/i386/kernel/io_apic.c | 7 +++++--
> arch/x86_64/kernel/io_apic.c | 7 +++++--
> 2 files changed, 10 insertions(+), 4 deletions(-)
>
> Index: linux-2.6/arch/i386/kernel/io_apic.c
> ===================================================================
> --- linux-2.6.orig/arch/i386/kernel/io_apic.c 2007-08-11 11:09:11.000000000 +0200
> +++ linux-2.6/arch/i386/kernel/io_apic.c 2007-08-11 11:09:12.000000000 +0200
> @@ -1256,12 +1256,15 @@ static struct irq_chip ioapic_chip;
> static void ioapic_register_intr(int irq, int vector, unsigned long trigger)
> {
> if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) ||
> - trigger == IOAPIC_LEVEL)
> + trigger == IOAPIC_LEVEL) {
> + irq_desc[irq].status |= IRQ_LEVEL;
> set_irq_chip_and_handler_name(irq, &ioapic_chip,
> handle_fasteoi_irq, "fasteoi");
> - else
> + } else {
> + irq_desc[irq].status &= ~IRQ_LEVEL;
> set_irq_chip_and_handler_name(irq, &ioapic_chip,
> handle_edge_irq, "edge");
> + }
> set_intr_gate(vector, interrupt[irq]);
> }
>
> Index: linux-2.6/arch/x86_64/kernel/io_apic.c
> ===================================================================
> --- linux-2.6.orig/arch/x86_64/kernel/io_apic.c 2007-08-11 11:09:11.000000000 +0200
> +++ linux-2.6/arch/x86_64/kernel/io_apic.c 2007-08-11 11:09:12.000000000 +0200
> @@ -800,12 +800,15 @@ static struct irq_chip ioapic_chip;
>
> static void ioapic_register_intr(int irq, unsigned long trigger)
> {
> - if (trigger)
> + if (trigger) {
> + irq_desc[irq].status |= IRQ_LEVEL;
> set_irq_chip_and_handler_name(irq, &ioapic_chip,
> handle_fasteoi_irq, "fasteoi");
> - else
> + } else {
> + irq_desc[irq].status &= ~IRQ_LEVEL;
> set_irq_chip_and_handler_name(irq, &ioapic_chip,
> handle_edge_irq, "edge");
> + }
> }
>
> static void setup_IO_APIC_irq(int apic, int pin, unsigned int irq,
>
> --
>
Maybe I miss something, but:
- why it's not done in other places with handle_level_irq or
handle_fasteoi_irq. Are we sure they can never get IRQ_PENDING flag
or we take the risk?
- what about e.g. handle_simple_irq: do we think it needs resending
or simply going to wait for good bug reports?
- is this .status cleared enough on free_irq or during request_irq?
BTW, of course something like this set of patches was needed here,
but I still think this shouldn't be done this way: the bug wasn't
diagnosed nor tested enough, some chips are suspected, and
nevertheless the change is done for everybody, whithout any
possibility to set this back for people who had no problems with
2.6.21 and 2.6.22 (at least for some transition time). Maybe some
other chips get confused now, and we get some notice of this maybe
only in 2.6.25, if we'are lucky enough to have somebody like Marcin
around to do the next git bisection?
Regards,
Jarek P.
next prev parent reply other threads:[~2007-08-13 14:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-12 15:46 [patch 0/3] [patch 0/3] genirq: Suppress resend of level interrupts Thomas Gleixner
2007-08-12 15:46 ` [patch 1/3] genirq: cleanup mismerge artifact Thomas Gleixner
2007-08-12 15:46 ` [patch 2/3] genirq: suppress resend of level interrupts Thomas Gleixner
2007-08-12 15:46 ` [patch 3/3] genirq: mark io_apic level interrupts to avoid resend Thomas Gleixner
2007-08-13 11:28 ` Jarek Poplawski [this message]
2007-08-13 12:07 ` Thomas Gleixner
2007-08-13 13:53 ` Jarek Poplawski
2007-08-13 14:16 ` Jarek Poplawski
2007-08-13 16:30 ` Thomas Gleixner
2007-08-14 7:12 ` Jarek Poplawski
2007-08-14 8:10 ` Thomas Gleixner
2007-08-14 9:23 ` Jarek Poplawski
2007-08-13 19:07 ` Benjamin Herrenschmidt
2007-08-14 8:01 ` Jarek Poplawski
2007-08-13 18:42 ` Benjamin Herrenschmidt
2007-08-14 7:08 ` [patch 0/3] [patch 0/3] genirq: Suppress resend of level interrupts Marcin Ślusarz
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=20070813112821.GA2863@ff.dom.local \
--to=jarkao2@o2.pl \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcin.slusarz@gmail.com \
--cc=mingo@elte.hu \
--cc=stable@kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=vignaud@xandmail.fr \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox