From: Bernhard Walle <bwalle@suse.de>
To: Andrew Morton <akpm@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>
Subject: [patch 1/7] Add IRQF_IRQPOLL_IRQ flag (common code)
Date: Fri, 23 Mar 2007 17:44:48 +0100 [thread overview]
Message-ID: <20070323190111.630752000@strauss.suse.de> (raw)
In-Reply-To: <20070323164447.659982000@strauss.suse.de>
[-- Attachment #1: IRQF_IRQPOLL_IRQ --]
[-- Type: text/plain, Size: 2761 bytes --]
This patch adds a IRQF_IRQPOLL_IRQ flag that the interrupt registration code
could use for the interrupt it wants to use for IRQ polling.
Because this must not be the timer interrupt, an additional flag was added
instead of re-using the IRQF_TIMER constant. Until all architectures will have
an IRQF_IRQPOLL_IRQ interrupt, irq == 0 will stay as alternative as it should
not break anything.
Also, note_interrupt() is called on CPU-specific interrupts to be used as
interrupt source for IRQ polling.
Signed-off-by: Bernhard Walle <bwalle@suse.de>
---
include/linux/interrupt.h | 4 ++++
kernel/irq/handle.c | 2 ++
kernel/irq/spurious.c | 4 +++-
3 files changed, 9 insertions(+), 1 deletion(-)
Index: linux-2.6.21-rc4-mm1/include/linux/interrupt.h
===================================================================
--- linux-2.6.21-rc4-mm1.orig/include/linux/interrupt.h
+++ linux-2.6.21-rc4-mm1/include/linux/interrupt.h
@@ -44,6 +44,9 @@
* IRQF_TIMER - Flag to mark this interrupt as timer interrupt
* IRQF_PERCPU - Interrupt is per cpu
* IRQF_NOBALANCING - Flag to exclude this interrupt from irq balancing
+ * IRQF_IRQPOLL_IRQ - Interrupt is used for polling (only the interrupt that is
+ * registered first in an shared interrupt is considered for
+ * performance reasons)
*/
#define IRQF_DISABLED 0x00000020
#define IRQF_SAMPLE_RANDOM 0x00000040
@@ -52,6 +55,7 @@
#define IRQF_TIMER 0x00000200
#define IRQF_PERCPU 0x00000400
#define IRQF_NOBALANCING 0x00000800
+#define IRQF_IRQPOLL_IRQ 0x00001000
/*
* Migration helpers. Scheduled for removal in 1/2007
Index: linux-2.6.21-rc4-mm1/kernel/irq/handle.c
===================================================================
--- linux-2.6.21-rc4-mm1.orig/kernel/irq/handle.c
+++ linux-2.6.21-rc4-mm1/kernel/irq/handle.c
@@ -180,6 +180,8 @@ fastcall unsigned int __do_IRQ(unsigned
if (desc->chip->ack)
desc->chip->ack(irq);
action_ret = handle_IRQ_event(irq, desc->action);
+ if (!noirqdebug)
+ note_interrupt(irq, desc, action_ret);
desc->chip->end(irq);
return 1;
}
Index: linux-2.6.21-rc4-mm1/kernel/irq/spurious.c
===================================================================
--- linux-2.6.21-rc4-mm1.orig/kernel/irq/spurious.c
+++ linux-2.6.21-rc4-mm1/kernel/irq/spurious.c
@@ -146,7 +146,9 @@ void note_interrupt(unsigned int irq, st
if (unlikely(irqfixup)) {
/* Don't punish working computers */
- if ((irqfixup == 2 && irq == 0) || action_ret == IRQ_NONE) {
+ if ((irqfixup == 2 && ((irq == 0) ||
+ (desc->action->flags & IRQF_IRQPOLL_IRQ))) ||
+ action_ret == IRQ_NONE) {
int ok = misrouted_irq(irq);
if (action_ret == IRQ_NONE)
desc->irqs_unhandled -= ok;
--
next prev parent reply other threads:[~2007-03-23 19:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-23 16:44 [patch 0/7] Add IRQF_IRQPOLL_IRQ flag to allow irqpoll Bernhard Walle
2007-03-23 16:44 ` Bernhard Walle [this message]
2007-03-23 16:44 ` [patch 2/7] Add IRQF_IRQPOLL_IRQ flag on IA64 Bernhard Walle
2007-03-23 16:44 ` [patch 3/7] Add IRQF_IRQPOLL_IRQ flag on x86_64 Bernhard Walle
2007-03-23 16:44 ` [patch 4/7] Add IRQF_IRQPOLL_IRQ flag on arm Bernhard Walle
2007-03-23 16:44 ` [patch 5/7] Add IRQF_IRQPOLL_IRQ flag on sh Bernhard Walle
2007-03-23 16:44 ` [patch 6/7] Add IRQF_IRQPOLL_IRQ flag on parisc Bernhard Walle
2007-03-23 16:44 ` [patch 7/7] Add IRQF_IRQPOLL_IRQ flag on i386 Bernhard Walle
2007-03-23 22:15 ` [patch 0/7] Add IRQF_IRQPOLL_IRQ flag to allow irqpoll Guennadi Liakhovetski
2007-03-23 22:25 ` Bernhard Walle
2007-03-23 23:21 ` Guennadi Liakhovetski
2007-03-25 20:29 ` Bernhard Walle
2007-03-27 5:01 ` Guennadi Liakhovetski
2007-03-27 5:16 ` Andrew Morton
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=20070323190111.630752000@strauss.suse.de \
--to=bwalle@suse.de \
--cc=akpm@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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
Powered by JetHome