From: Ingo Molnar <mingo@elte.hu>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: dwalker@mvista.com, linux-kernel@vger.kernel.org,
linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] 2.6.18-rt7: PowerPC: fix breakage in threaded fasteoi type IRQ handlers
Date: Mon, 20 Nov 2006 18:55:02 +0100 [thread overview]
Message-ID: <20061120175502.GA12733@elte.hu> (raw)
In-Reply-To: <20061120172642.GA8683@elte.hu>
* Ingo Molnar <mingo@elte.hu> wrote:
> i'm hacking up something now to see whether it makes sense to
> introduce a central threaded flow type, or whether it's better the
> branch off the current flow types (as the code does it right now).
ok, a central flow type caused more problems than good - the main
complication is that the handler needs to know the true 'flow'
(edge/level/fasteoi, etc.) anyway, even in the threaded case.
So i rather went on making the existing flow handlers more
threading-friendly, and undoing the x86_64 and i386 arch changes to make
sure that the default handlers all work fine. Does the patch below
(against -rt4) do the trick for your on PPC too?
[ also, i excluded old-style do_IRQ() platforms from irq threading -
those hopelessly mix all the flow types that makes robust threading
support not really possible. ]
Ingo
Index: linux/arch/i386/kernel/io_apic.c
===================================================================
--- linux.orig/arch/i386/kernel/io_apic.c
+++ linux/arch/i386/kernel/io_apic.c
@@ -1272,22 +1272,12 @@ 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) {
-#ifdef CONFIG_PREEMPT_HARDIRQS
+ trigger == IOAPIC_LEVEL)
set_irq_chip_and_handler_name(irq, &ioapic_chip,
- handle_level_irq, "level-threaded");
-#else
- set_irq_chip_and_handler_name(irq, &ioapic_chip,
- handle_fasteoi_irq, "fasteoi");
-#endif
- } else {
-#ifdef CONFIG_PREEMPT_HARDIRQS
+ handle_fasteoi_irq, "fasteoi");
+ else {
set_irq_chip_and_handler_name(irq, &ioapic_chip,
- handle_edge_irq, "edge-threaded");
-#else
- set_irq_chip_and_handler_name(irq, &ioapic_chip,
- handle_edge_irq, "edge");
-#endif
+ handle_edge_irq, "edge");
}
set_intr_gate(vector, interrupt[irq]);
}
Index: linux/arch/x86_64/kernel/io_apic.c
===================================================================
--- linux.orig/arch/x86_64/kernel/io_apic.c
+++ linux/arch/x86_64/kernel/io_apic.c
@@ -787,22 +787,12 @@ 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) {
-#ifdef CONFIG_PREEMPT_HARDIRQS
- set_irq_chip_and_handler_name(irq, &ioapic_chip,
- handle_level_irq, "level-threaded");
-#else
+ trigger == IOAPIC_LEVEL)
set_irq_chip_and_handler_name(irq, &ioapic_chip,
handle_fasteoi_irq, "fasteoi");
-#endif
- } else {
-#ifdef CONFIG_PREEMPT_HARDIRQS
- set_irq_chip_and_handler_name(irq, &ioapic_chip,
- handle_edge_irq, "edge-threaded");
-#else
+ else {
set_irq_chip_and_handler_name(irq, &ioapic_chip,
handle_edge_irq, "edge");
-#endif
}
}
Index: linux/kernel/Kconfig.preempt
===================================================================
--- linux.orig/kernel/Kconfig.preempt
+++ linux/kernel/Kconfig.preempt
@@ -105,7 +105,7 @@ config PREEMPT_SOFTIRQS
config PREEMPT_HARDIRQS
bool "Thread Hardirqs"
default n
-# depends on PREEMPT
+ depends on !GENERIC_HARDIRQS_NO__DO_IRQ
help
This option reduces the latency of the kernel by 'threading'
hardirqs. This means that all (or selected) hardirqs will run
Index: linux/kernel/irq/chip.c
===================================================================
--- linux.orig/kernel/irq/chip.c
+++ linux/kernel/irq/chip.c
@@ -238,8 +238,10 @@ static inline void mask_ack_irq(struct i
if (desc->chip->mask_ack)
desc->chip->mask_ack(irq);
else {
- desc->chip->mask(irq);
- desc->chip->ack(irq);
+ if (desc->chip->mask)
+ desc->chip->mask(irq);
+ if (desc->chip->mask)
+ desc->chip->ack(irq);
}
}
Index: linux/kernel/irq/handle.c
===================================================================
--- linux.orig/kernel/irq/handle.c
+++ linux/kernel/irq/handle.c
@@ -266,12 +266,6 @@ fastcall notrace unsigned int __do_IRQ(u
goto out;
/*
- * hardirq redirection to the irqd process context:
- */
- if (redirect_hardirq(desc))
- goto out_no_end;
-
- /*
* Edge triggered interrupts need to remember
* pending events.
* This applies to any hw interrupts that allow a second
@@ -303,7 +297,6 @@ out:
* disabled while the handler was running.
*/
desc->chip->end(irq);
-out_no_end:
spin_unlock(&desc->lock);
return 1;
WARNING: multiple messages have this Message-ID (diff)
From: Ingo Molnar <mingo@elte.hu>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org,
dwalker@mvista.com
Subject: Re: [PATCH] 2.6.18-rt7: PowerPC: fix breakage in threaded fasteoi type IRQ handlers
Date: Mon, 20 Nov 2006 18:55:02 +0100 [thread overview]
Message-ID: <20061120175502.GA12733@elte.hu> (raw)
In-Reply-To: <20061120172642.GA8683@elte.hu>
* Ingo Molnar <mingo@elte.hu> wrote:
> i'm hacking up something now to see whether it makes sense to
> introduce a central threaded flow type, or whether it's better the
> branch off the current flow types (as the code does it right now).
ok, a central flow type caused more problems than good - the main
complication is that the handler needs to know the true 'flow'
(edge/level/fasteoi, etc.) anyway, even in the threaded case.
So i rather went on making the existing flow handlers more
threading-friendly, and undoing the x86_64 and i386 arch changes to make
sure that the default handlers all work fine. Does the patch below
(against -rt4) do the trick for your on PPC too?
[ also, i excluded old-style do_IRQ() platforms from irq threading -
those hopelessly mix all the flow types that makes robust threading
support not really possible. ]
Ingo
Index: linux/arch/i386/kernel/io_apic.c
===================================================================
--- linux.orig/arch/i386/kernel/io_apic.c
+++ linux/arch/i386/kernel/io_apic.c
@@ -1272,22 +1272,12 @@ 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) {
-#ifdef CONFIG_PREEMPT_HARDIRQS
+ trigger == IOAPIC_LEVEL)
set_irq_chip_and_handler_name(irq, &ioapic_chip,
- handle_level_irq, "level-threaded");
-#else
- set_irq_chip_and_handler_name(irq, &ioapic_chip,
- handle_fasteoi_irq, "fasteoi");
-#endif
- } else {
-#ifdef CONFIG_PREEMPT_HARDIRQS
+ handle_fasteoi_irq, "fasteoi");
+ else {
set_irq_chip_and_handler_name(irq, &ioapic_chip,
- handle_edge_irq, "edge-threaded");
-#else
- set_irq_chip_and_handler_name(irq, &ioapic_chip,
- handle_edge_irq, "edge");
-#endif
+ handle_edge_irq, "edge");
}
set_intr_gate(vector, interrupt[irq]);
}
Index: linux/arch/x86_64/kernel/io_apic.c
===================================================================
--- linux.orig/arch/x86_64/kernel/io_apic.c
+++ linux/arch/x86_64/kernel/io_apic.c
@@ -787,22 +787,12 @@ 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) {
-#ifdef CONFIG_PREEMPT_HARDIRQS
- set_irq_chip_and_handler_name(irq, &ioapic_chip,
- handle_level_irq, "level-threaded");
-#else
+ trigger == IOAPIC_LEVEL)
set_irq_chip_and_handler_name(irq, &ioapic_chip,
handle_fasteoi_irq, "fasteoi");
-#endif
- } else {
-#ifdef CONFIG_PREEMPT_HARDIRQS
- set_irq_chip_and_handler_name(irq, &ioapic_chip,
- handle_edge_irq, "edge-threaded");
-#else
+ else {
set_irq_chip_and_handler_name(irq, &ioapic_chip,
handle_edge_irq, "edge");
-#endif
}
}
Index: linux/kernel/Kconfig.preempt
===================================================================
--- linux.orig/kernel/Kconfig.preempt
+++ linux/kernel/Kconfig.preempt
@@ -105,7 +105,7 @@ config PREEMPT_SOFTIRQS
config PREEMPT_HARDIRQS
bool "Thread Hardirqs"
default n
-# depends on PREEMPT
+ depends on !GENERIC_HARDIRQS_NO__DO_IRQ
help
This option reduces the latency of the kernel by 'threading'
hardirqs. This means that all (or selected) hardirqs will run
Index: linux/kernel/irq/chip.c
===================================================================
--- linux.orig/kernel/irq/chip.c
+++ linux/kernel/irq/chip.c
@@ -238,8 +238,10 @@ static inline void mask_ack_irq(struct i
if (desc->chip->mask_ack)
desc->chip->mask_ack(irq);
else {
- desc->chip->mask(irq);
- desc->chip->ack(irq);
+ if (desc->chip->mask)
+ desc->chip->mask(irq);
+ if (desc->chip->mask)
+ desc->chip->ack(irq);
}
}
Index: linux/kernel/irq/handle.c
===================================================================
--- linux.orig/kernel/irq/handle.c
+++ linux/kernel/irq/handle.c
@@ -266,12 +266,6 @@ fastcall notrace unsigned int __do_IRQ(u
goto out;
/*
- * hardirq redirection to the irqd process context:
- */
- if (redirect_hardirq(desc))
- goto out_no_end;
-
- /*
* Edge triggered interrupts need to remember
* pending events.
* This applies to any hw interrupts that allow a second
@@ -303,7 +297,6 @@ out:
* disabled while the handler was running.
*/
desc->chip->end(irq);
-out_no_end:
spin_unlock(&desc->lock);
return 1;
next prev parent reply other threads:[~2006-11-20 17:56 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-19 19:43 [PATCH] 2.6.18-rt7: PowerPC: fix breakage in threaded fasteoi type IRQ handlers Sergei Shtylyov
2006-11-19 19:43 ` Sergei Shtylyov
2006-11-19 20:00 ` Benjamin Herrenschmidt
2006-11-19 20:00 ` Benjamin Herrenschmidt
2006-11-19 20:04 ` Benjamin Herrenschmidt
2006-11-19 20:04 ` Benjamin Herrenschmidt
2006-11-19 20:11 ` Sergei Shtylyov
2006-11-19 20:11 ` Sergei Shtylyov
2006-11-19 20:06 ` Ingo Molnar
2006-11-19 20:06 ` Ingo Molnar
2006-11-19 20:19 ` Benjamin Herrenschmidt
2006-11-19 20:19 ` Benjamin Herrenschmidt
2006-11-19 20:23 ` Ingo Molnar
2006-11-19 20:23 ` Ingo Molnar
2006-11-19 20:31 ` Sergei Shtylyov
2006-11-19 20:31 ` Sergei Shtylyov
2006-11-19 20:36 ` Benjamin Herrenschmidt
2006-11-19 20:36 ` Benjamin Herrenschmidt
2006-11-19 20:42 ` Sergei Shtylyov
2006-11-19 20:42 ` Sergei Shtylyov
2006-11-19 20:45 ` Benjamin Herrenschmidt
2006-11-19 20:45 ` Benjamin Herrenschmidt
2006-11-19 20:49 ` Benjamin Herrenschmidt
2006-11-19 20:49 ` Benjamin Herrenschmidt
2006-11-20 1:16 ` Benjamin Herrenschmidt
2006-11-20 1:16 ` Benjamin Herrenschmidt
2006-11-20 10:01 ` Ingo Molnar
2006-11-20 10:01 ` Ingo Molnar
2006-11-20 15:29 ` Sergei Shtylyov
2006-11-20 15:29 ` Sergei Shtylyov
2006-11-20 16:56 ` Ingo Molnar
2006-11-20 16:56 ` Ingo Molnar
2006-11-20 17:03 ` Sergei Shtylyov
2006-11-20 17:03 ` Sergei Shtylyov
2006-11-20 17:26 ` Ingo Molnar
2006-11-20 17:26 ` Ingo Molnar
2006-11-20 17:55 ` Ingo Molnar [this message]
2006-11-20 17:55 ` Ingo Molnar
2006-11-20 18:20 ` Daniel Walker
2006-11-20 18:20 ` Daniel Walker
2006-11-20 18:29 ` Ingo Molnar
2006-11-20 18:29 ` Ingo Molnar
2006-11-20 18:30 ` Sergei Shtylyov
2006-11-20 18:30 ` Sergei Shtylyov
2006-11-20 19:10 ` Ingo Molnar
2006-11-20 19:10 ` Ingo Molnar
2006-11-20 19:11 ` Ingo Molnar
2006-11-20 19:11 ` Ingo Molnar
2006-11-20 19:18 ` Sergei Shtylyov
2006-11-20 19:18 ` Sergei Shtylyov
2006-11-20 19:24 ` Sergei Shtylyov
2006-11-20 19:24 ` Sergei Shtylyov
2006-11-20 19:23 ` Ingo Molnar
2006-11-20 20:11 ` Benjamin Herrenschmidt
2006-11-20 20:11 ` Benjamin Herrenschmidt
2006-11-20 20:09 ` Benjamin Herrenschmidt
2006-11-20 20:09 ` Benjamin Herrenschmidt
2006-11-20 16:25 ` Daniel Walker
2006-11-20 16:25 ` Daniel Walker
2006-11-20 16:42 ` Ingo Molnar
2006-11-20 17:01 ` Daniel Walker
2006-11-20 20:07 ` Benjamin Herrenschmidt
2006-11-20 20:07 ` Benjamin Herrenschmidt
2006-11-19 20:26 ` Sergei Shtylyov
2006-11-19 20:26 ` Sergei Shtylyov
2006-11-19 20:32 ` Benjamin Herrenschmidt
2006-11-19 20:32 ` Benjamin Herrenschmidt
2006-11-19 20:40 ` Sergei Shtylyov
2006-11-19 20:40 ` Sergei Shtylyov
2006-11-19 20:41 ` Benjamin Herrenschmidt
2006-11-19 20:41 ` Benjamin Herrenschmidt
2006-11-19 20:52 ` Sergei Shtylyov
2006-11-19 20:52 ` Sergei Shtylyov
2006-11-19 21:08 ` Benjamin Herrenschmidt
2006-11-19 21:08 ` Benjamin Herrenschmidt
2006-11-20 15:46 ` Sergei Shtylyov
2006-11-20 15:46 ` Sergei Shtylyov
2006-11-19 20:44 ` Sergei Shtylyov
2006-11-19 20:48 ` Benjamin Herrenschmidt
2007-05-17 13:20 ` [PATCH 2.6.21-rt2] PowerPC: revert fix for threaded fasteoi " Sergei Shtylyov
2007-05-17 13:20 ` Sergei Shtylyov
2007-07-12 16:47 ` Sergei Shtylyov
2007-07-12 16:52 ` Thomas Gleixner
2007-07-12 16:52 ` Thomas Gleixner
2007-07-13 17:19 ` Sergei Shtylyov
2007-07-13 17:19 ` Sergei Shtylyov
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=20061120175502.GA12733@elte.hu \
--to=mingo@elte.hu \
--cc=dwalker@mvista.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=sshtylyov@ru.mvista.com \
/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.