* [PATCH] fix interrupt rerouting for Altix
@ 2004-06-17 15:46 Pat Gefre
2004-06-18 17:17 ` Jesse Barnes
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Pat Gefre @ 2004-06-17 15:46 UTC (permalink / raw)
To: linux-ia64
Patch to fix our interrupt re-routing.
-- Pat
Signed-off-by: Patrick Gefre <pfg@sgi.com>
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/06/17 10:40:46-05:00 pfg@sgi.com
# Patch to fix interrupt re-routing.
#
# arch/ia64/sn/kernel/irq.c
# 2004/06/17 10:40:38-05:00 pfg@sgi.com +17 -0
#
# arch/ia64/sn/io/sn2/ml_iograph.c
# 2004/06/17 10:40:38-05:00 pfg@sgi.com +8 -8
#
#
diff -Nru a/arch/ia64/sn/io/sn2/ml_iograph.c b/arch/ia64/sn/io/sn2/ml_iograph.c
--- a/arch/ia64/sn/io/sn2/ml_iograph.c 2004-06-17 10:42:20 -05:00
+++ b/arch/ia64/sn/io/sn2/ml_iograph.c 2004-06-17 10:42:20 -05:00
@@ -518,6 +518,14 @@
ASSERT(hubv != GRAPH_VERTEX_NONE);
/*
+ * attach our hub_provider information to hubv,
+ * so we can use it as a crosstalk provider "master"
+ * vertex.
+ */
+ xtalk_provider_register(hubv, &hub_provider);
+ xtalk_provider_startup(hubv);
+
+ /*
* If nothing connected to this hub's xtalk port, we're done.
*/
early_probe_for_widget(hubv, &hwid);
@@ -526,14 +534,6 @@
return;
/* NOTREACHED */
}
-
- /*
- * attach our hub_provider information to hubv,
- * so we can use it as a crosstalk provider "master"
- * vertex.
- */
- xtalk_provider_register(hubv, &hub_provider);
- xtalk_provider_startup(hubv);
/*
* Create a vertex to represent the crosstalk bus
diff -Nru a/arch/ia64/sn/kernel/irq.c b/arch/ia64/sn/kernel/irq.c
--- a/arch/ia64/sn/kernel/irq.c 2004-06-17 10:42:20 -05:00
+++ b/arch/ia64/sn/kernel/irq.c 2004-06-17 10:42:20 -05:00
@@ -41,6 +41,7 @@
extern void pcibr_force_interrupt(pcibr_intr_t intr);
extern int sn_force_interrupt_flag;
struct irq_desc * sn_irq_desc(unsigned int irq);
+extern cpumask_t __cacheline_aligned pending_irq_cpumask[NR_IRQS];
struct sn_intr_list_t {
struct sn_intr_list_t *next;
@@ -71,6 +72,21 @@
{
}
+static inline void move_irq(int irq)
+{
+ /* note - we hold desc->lock */
+ cpumask_t tmp;
+ irq_desc_t *desc = irq_descp(irq);
+
+ if (!cpus_empty(pending_irq_cpumask[irq])) {
+ cpus_and(tmp, pending_irq_cpumask[irq], cpu_online_map);
+ if (unlikely(!cpus_empty(tmp))) {
+ desc->handler->set_affinity(irq, pending_irq_cpumask[irq]);
+ }
+ cpus_clear(pending_irq_cpumask[irq]);
+ }
+}
+
static void
sn_ack_irq(unsigned int irq)
{
@@ -94,6 +110,7 @@
}
HUB_S((unsigned long *)GLOBAL_MMR_ADDR(nasid, SH_EVENT_OCCURRED_ALIAS), mask );
__set_bit(irq, (volatile void *)pda->sn_in_service_ivecs);
+ move_irq(irq);
}
static void
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fix interrupt rerouting for Altix
2004-06-17 15:46 [PATCH] fix interrupt rerouting for Altix Pat Gefre
@ 2004-06-18 17:17 ` Jesse Barnes
2004-06-18 22:30 ` Ashok Raj
2004-06-22 17:58 ` Pat Gefre
2 siblings, 0 replies; 4+ messages in thread
From: Jesse Barnes @ 2004-06-18 17:17 UTC (permalink / raw)
To: linux-ia64
On Thursday, June 17, 2004 11:46 am, Pat Gefre wrote:
> +static inline void move_irq(int irq)
> +{
> + /* note - we hold desc->lock */
> + cpumask_t tmp;
> + irq_desc_t *desc = irq_descp(irq);
> +
> + if (!cpus_empty(pending_irq_cpumask[irq])) {
> + cpus_and(tmp, pending_irq_cpumask[irq], cpu_online_map);
> + if (unlikely(!cpus_empty(tmp))) {
> + desc->handler->set_affinity(irq, pending_irq_cpumask[irq]);
> + }
> + cpus_clear(pending_irq_cpumask[irq]);
> + }
> +}
This looks like a duplicate of what's in iosapic.c. Maybe we should just have
one version of it in irq.c? Ashok?
Thanks,
Jesse
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fix interrupt rerouting for Altix
2004-06-17 15:46 [PATCH] fix interrupt rerouting for Altix Pat Gefre
2004-06-18 17:17 ` Jesse Barnes
@ 2004-06-18 22:30 ` Ashok Raj
2004-06-22 17:58 ` Pat Gefre
2 siblings, 0 replies; 4+ messages in thread
From: Ashok Raj @ 2004-06-18 22:30 UTC (permalink / raw)
To: linux-ia64
On Fri, Jun 18, 2004 at 01:17:37PM -0400, Jesse Barnes wrote:
> This looks like a duplicate of what's in iosapic.c. Maybe we should just have
> one version of it in irq.c? Ashok?
Yep.. i think it will be nice to integrate them into irq.c. I have
the patch to do that attached below.
Pat, could you go ahead and submit the patch to work with this attached
patch? i was not able to apply yours clean, patch reported
garbled patch, and i didnt take time to fix it manually...
-
Cheers,
Ashok Raj
- Linux OS Technologies Team
Signed-off-by: Ashok Raj <ashok.raj@intel.com>
D: This patch makes move_irq() function from iospic.c to irq.c to make this common for
D: ia64 archs. Both that use iosapic, and the SN2 versions.
---
linux-2.6.7-root/arch/ia64/kernel/iosapic.c | 16 ----------------
linux-2.6.7-root/arch/ia64/kernel/irq.c | 16 ++++++++++++++++
linux-2.6.7-root/include/asm-ia64/irq.h | 6 ++++++
3 files changed, 22 insertions(+), 16 deletions(-)
diff -puN arch/ia64/kernel/irq.c~make_moveirq_common arch/ia64/kernel/irq.c
--- linux-2.6.7/arch/ia64/kernel/irq.c~make_moveirq_common 2004-06-18 15:22:57.297836562 -0700
+++ linux-2.6.7-root/arch/ia64/kernel/irq.c 2004-06-18 15:22:57.303695940 -0700
@@ -1018,6 +1018,22 @@ static int irq_affinity_write_proc (stru
return full_count;
}
+void move_irq(int irq)
+{
+ /* note - we hold desc->lock */
+ cpumask_t tmp;
+ irq_desc_t *desc = irq_descp(irq);
+
+ if (!cpus_empty(pending_irq_cpumask[irq])) {
+ cpus_and(tmp, pending_irq_cpumask[irq], cpu_online_map);
+ if (unlikely(!cpus_empty(tmp))) {
+ desc->handler->set_affinity(irq, pending_irq_cpumask[irq]);
+ }
+ cpus_clear(pending_irq_cpumask[irq]);
+ }
+}
+
+
#endif /* CONFIG_SMP */
#ifdef CONFIG_HOTPLUG_CPU
diff -puN arch/ia64/kernel/iosapic.c~make_moveirq_common arch/ia64/kernel/iosapic.c
--- linux-2.6.7/arch/ia64/kernel/iosapic.c~make_moveirq_common 2004-06-18 15:22:57.298813125 -0700
+++ linux-2.6.7-root/arch/ia64/kernel/iosapic.c 2004-06-18 15:22:57.303695940 -0700
@@ -100,7 +100,6 @@
#endif
static spinlock_t iosapic_lock = SPIN_LOCK_UNLOCKED;
-extern cpumask_t __cacheline_aligned pending_irq_cpumask[NR_IRQS];
/* These tables map IA-64 vectors to the IOSAPIC pin that generates this vector. */
@@ -335,21 +334,6 @@ iosapic_set_affinity (unsigned int irq,
#endif
}
-static inline void move_irq(int irq)
-{
- /* note - we hold desc->lock */
- cpumask_t tmp;
- irq_desc_t *desc = irq_descp(irq);
-
- if (!cpus_empty(pending_irq_cpumask[irq])) {
- cpus_and(tmp, pending_irq_cpumask[irq], cpu_online_map);
- if (unlikely(!cpus_empty(tmp))) {
- desc->handler->set_affinity(irq, pending_irq_cpumask[irq]);
- }
- cpus_clear(pending_irq_cpumask[irq]);
- }
-}
-
/*
* Handlers for level-triggered interrupts.
*/
diff -puN include/asm-ia64/irq.h~make_moveirq_common include/asm-ia64/irq.h
--- linux-2.6.7/include/asm-ia64/irq.h~make_moveirq_common 2004-06-18 15:22:57.300766251 -0700
+++ linux-2.6.7-root/include/asm-ia64/irq.h 2004-06-18 15:22:57.303695940 -0700
@@ -30,6 +30,12 @@ extern void disable_irq_nosync (unsigned
extern void enable_irq (unsigned int);
extern void set_irq_affinity_info (unsigned int irq, int dest, int redir);
+#ifdef CONFIG_SMP
+extern void move_irq(int irq);
+#else
+#define move_irq(irq)
+#endif
+
struct irqaction;
struct pt_regs;
int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
_
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fix interrupt rerouting for Altix
2004-06-17 15:46 [PATCH] fix interrupt rerouting for Altix Pat Gefre
2004-06-18 17:17 ` Jesse Barnes
2004-06-18 22:30 ` Ashok Raj
@ 2004-06-22 17:58 ` Pat Gefre
2 siblings, 0 replies; 4+ messages in thread
From: Pat Gefre @ 2004-06-22 17:58 UTC (permalink / raw)
To: linux-ia64
Sure. I'll apply your change, test it and then send it out.
-- Pat
On Fri, 18 Jun 2004, Ashok Raj wrote:
+ On Fri, Jun 18, 2004 at 01:17:37PM -0400, Jesse Barnes wrote:
+ > This looks like a duplicate of what's in iosapic.c. Maybe we should just have
+ > one version of it in irq.c? Ashok?
+
+ Yep.. i think it will be nice to integrate them into irq.c. I have
+ the patch to do that attached below.
+
+ Pat, could you go ahead and submit the patch to work with this attached
+ patch? i was not able to apply yours clean, patch reported
+ garbled patch, and i didnt take time to fix it manually...
+
+ -
+ Cheers,
+ Ashok Raj
+ - Linux OS Technologies Team
+
+
+ Signed-off-by: Ashok Raj <ashok.raj@intel.com>
+
+ D: This patch makes move_irq() function from iospic.c to irq.c to make this common for
+ D: ia64 archs. Both that use iosapic, and the SN2 versions.
+
+
+ ---
+
+ linux-2.6.7-root/arch/ia64/kernel/iosapic.c | 16 ----------------
+ linux-2.6.7-root/arch/ia64/kernel/irq.c | 16 ++++++++++++++++
+ linux-2.6.7-root/include/asm-ia64/irq.h | 6 ++++++
+ 3 files changed, 22 insertions(+), 16 deletions(-)
+
+ diff -puN arch/ia64/kernel/irq.c~make_moveirq_common arch/ia64/kernel/irq.c
+ --- linux-2.6.7/arch/ia64/kernel/irq.c~make_moveirq_common 2004-06-18 15:22:57.297836562 -0700
+ +++ linux-2.6.7-root/arch/ia64/kernel/irq.c 2004-06-18 15:22:57.303695940 -0700
+ @@ -1018,6 +1018,22 @@ static int irq_affinity_write_proc (stru
+ return full_count;
+ }
+
+ +void move_irq(int irq)
+ +{
+ + /* note - we hold desc->lock */
+ + cpumask_t tmp;
+ + irq_desc_t *desc = irq_descp(irq);
+ +
+ + if (!cpus_empty(pending_irq_cpumask[irq])) {
+ + cpus_and(tmp, pending_irq_cpumask[irq], cpu_online_map);
+ + if (unlikely(!cpus_empty(tmp))) {
+ + desc->handler->set_affinity(irq, pending_irq_cpumask[irq]);
+ + }
+ + cpus_clear(pending_irq_cpumask[irq]);
+ + }
+ +}
+ +
+ +
+ #endif /* CONFIG_SMP */
+
+ #ifdef CONFIG_HOTPLUG_CPU
+ diff -puN arch/ia64/kernel/iosapic.c~make_moveirq_common arch/ia64/kernel/iosapic.c
+ --- linux-2.6.7/arch/ia64/kernel/iosapic.c~make_moveirq_common 2004-06-18 15:22:57.298813125 -0700
+ +++ linux-2.6.7-root/arch/ia64/kernel/iosapic.c 2004-06-18 15:22:57.303695940 -0700
+ @@ -100,7 +100,6 @@
+ #endif
+
+ static spinlock_t iosapic_lock = SPIN_LOCK_UNLOCKED;
+ -extern cpumask_t __cacheline_aligned pending_irq_cpumask[NR_IRQS];
+
+ /* These tables map IA-64 vectors to the IOSAPIC pin that generates this vector. */
+
+ @@ -335,21 +334,6 @@ iosapic_set_affinity (unsigned int irq,
+ #endif
+ }
+
+ -static inline void move_irq(int irq)
+ -{
+ - /* note - we hold desc->lock */
+ - cpumask_t tmp;
+ - irq_desc_t *desc = irq_descp(irq);
+ -
+ - if (!cpus_empty(pending_irq_cpumask[irq])) {
+ - cpus_and(tmp, pending_irq_cpumask[irq], cpu_online_map);
+ - if (unlikely(!cpus_empty(tmp))) {
+ - desc->handler->set_affinity(irq, pending_irq_cpumask[irq]);
+ - }
+ - cpus_clear(pending_irq_cpumask[irq]);
+ - }
+ -}
+ -
+ /*
+ * Handlers for level-triggered interrupts.
+ */
+ diff -puN include/asm-ia64/irq.h~make_moveirq_common include/asm-ia64/irq.h
+ --- linux-2.6.7/include/asm-ia64/irq.h~make_moveirq_common 2004-06-18 15:22:57.300766251 -0700
+ +++ linux-2.6.7-root/include/asm-ia64/irq.h 2004-06-18 15:22:57.303695940 -0700
+ @@ -30,6 +30,12 @@ extern void disable_irq_nosync (unsigned
+ extern void enable_irq (unsigned int);
+ extern void set_irq_affinity_info (unsigned int irq, int dest, int redir);
+
+ +#ifdef CONFIG_SMP
+ +extern void move_irq(int irq);
+ +#else
+ +#define move_irq(irq)
+ +#endif
+ +
+ struct irqaction;
+ struct pt_regs;
+ int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
+
+ _
+
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-06-22 17:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-17 15:46 [PATCH] fix interrupt rerouting for Altix Pat Gefre
2004-06-18 17:17 ` Jesse Barnes
2004-06-18 22:30 ` Ashok Raj
2004-06-22 17:58 ` Pat Gefre
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox