mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: 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>,
	Jarek Poplawski <jarkao2@o2.pl>
Subject: [patch 3/3] genirq: mark io_apic level interrupts to avoid resend
Date: Sun, 12 Aug 2007 15:46:36 -0000	[thread overview]
Message-ID: <20070812152303.177006193@inhelltoy.tec.linutronix.de> (raw)
In-Reply-To: <20070812152213.551812576@inhelltoy.tec.linutronix.de>

[-- Attachment #1: i386-x86-64-mark-fasteio-interrupts-level-triggered.patch --]
[-- Type: text/plain, Size: 2087 bytes --]

Level type interrupts do not need to be resent. It was also found that
some chipsets get confused in case of the resend. 

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,

-- 


  parent reply	other threads:[~2007-08-12 15:45 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 ` Thomas Gleixner [this message]
2007-08-13 11:28   ` [patch 3/3] genirq: mark io_apic level interrupts to avoid resend Jarek Poplawski
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=20070812152303.177006193@inhelltoy.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=jarkao2@o2.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcin.slusarz@gmail.com \
    --cc=mingo@elte.hu \
    --cc=stable@kernel.org \
    --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

all inboxes | Powered by JetHome®