All of lore.kernel.org
 help / color / mirror / Atom feed
* [Adeos-main] [PATCH] x86: Fix virtualization of IRQ_MOVE_CLEANUP_VECTOR
@ 2010-01-28  9:51 Jan Kiszka
  2010-01-28 16:55 ` [Adeos-main] [PATCH v2] x86: Fix handling " Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2010-01-28  9:51 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: adeos-main

IRQ_MOVE_CLEANUP_VECTOR is at 0x20, ie. far below FIRST_SYSTEM_VECTOR.
So we must not translate it when calling ipipe_virtualize_irq.

Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
---
 arch/x86/kernel/ipipe.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/ipipe.c b/arch/x86/kernel/ipipe.c
index b471355..ea681e6 100644
--- a/arch/x86/kernel/ipipe.c
+++ b/arch/x86/kernel/ipipe.c
@@ -289,7 +289,7 @@ void __init __ipipe_enable_pipeline(void)
 			     IPIPE_STDROOT_MASK);
 
 	ipipe_virtualize_irq(ipipe_root_domain,
-			     ipipe_apic_vector_irq(IRQ_MOVE_CLEANUP_VECTOR),
+			     IRQ_MOVE_CLEANUP_VECTOR,
 			     (ipipe_irq_handler_t)&smp_irq_move_cleanup_interrupt,
 			     NULL,
 			     &__ipipe_ack_apic,
@@ -311,7 +311,10 @@ void __init __ipipe_enable_pipeline(void)
 	 * IPIPE_SYSTEM_MASK has been passed for them, that's ok. */
 
 	for (irq = 0; irq < NR_IRQS; irq++)
-		/* Fails for IPIPE_CRITICAL_IPI but that's ok. */
+		/*
+		 * Fails for IPIPE_CRITICAL_IPI and IRQ_MOVE_CLEANUP_VECTOR,
+		 * but that's ok.
+		 */
 		ipipe_virtualize_irq(ipipe_root_domain,
 				     irq,
 				     (ipipe_irq_handler_t)&do_IRQ,
-- 
1.6.0.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Adeos-main] [PATCH v2] x86: Fix handling of IRQ_MOVE_CLEANUP_VECTOR
  2010-01-28  9:51 [Adeos-main] [PATCH] x86: Fix virtualization of IRQ_MOVE_CLEANUP_VECTOR Jan Kiszka
@ 2010-01-28 16:55 ` Jan Kiszka
  2010-01-28 17:12   ` [Adeos-main] [PATCH v3] " Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2010-01-28 16:55 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: adeos-main

IRQ_MOVE_CLEANUP_VECTOR is at 0x20, ie. far below FIRST_SYSTEM_VECTOR.
So we must not translate it when calling ipipe_virtualize_irq, and we
have to demux it properly in __ipipe_handle_irq.

Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
---

Changes in v2:
 - special demux code for __ipipe_handle_irq

 arch/x86/kernel/ipipe.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/ipipe.c b/arch/x86/kernel/ipipe.c
index b471355..76fd782 100644
--- a/arch/x86/kernel/ipipe.c
+++ b/arch/x86/kernel/ipipe.c
@@ -289,7 +289,7 @@ void __init __ipipe_enable_pipeline(void)
 			     IPIPE_STDROOT_MASK);
 
 	ipipe_virtualize_irq(ipipe_root_domain,
-			     ipipe_apic_vector_irq(IRQ_MOVE_CLEANUP_VECTOR),
+			     IRQ_MOVE_CLEANUP_VECTOR,
 			     (ipipe_irq_handler_t)&smp_irq_move_cleanup_interrupt,
 			     NULL,
 			     &__ipipe_ack_apic,
@@ -311,7 +311,10 @@ void __init __ipipe_enable_pipeline(void)
 	 * IPIPE_SYSTEM_MASK has been passed for them, that's ok. */
 
 	for (irq = 0; irq < NR_IRQS; irq++)
-		/* Fails for IPIPE_CRITICAL_IPI but that's ok. */
+		/*
+		 * Fails for IPIPE_CRITICAL_IPI and IRQ_MOVE_CLEANUP_VECTOR,
+		 * but that's ok.
+		 */
 		ipipe_virtualize_irq(ipipe_root_domain,
 				     irq,
 				     (ipipe_irq_handler_t)&do_IRQ,
@@ -900,6 +903,8 @@ int __ipipe_handle_irq(struct pt_regs *regs)
 #ifdef CONFIG_X86_LOCAL_APIC
 		if (vector >= FIRST_SYSTEM_VECTOR)
 			irq = ipipe_apic_vector_irq(vector);
+		else if (vector == IRQ_MOVE_CLEANUP_VECTOR)
+			irq = vector;
 		else
 #endif
 			irq = __get_cpu_var(vector_irq)[vector];
-- 
1.6.0.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Adeos-main] [PATCH v3] x86: Fix handling of IRQ_MOVE_CLEANUP_VECTOR
  2010-01-28 16:55 ` [Adeos-main] [PATCH v2] x86: Fix handling " Jan Kiszka
@ 2010-01-28 17:12   ` Jan Kiszka
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Kiszka @ 2010-01-28 17:12 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: adeos-main

IRQ_MOVE_CLEANUP_VECTOR is at 0x20, ie. far below FIRST_SYSTEM_VECTOR.
So we must not translate it when calling ipipe_virtualize_irq, and we
have to demux it properly in __ipipe_handle_irq.

Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
---

Changes in v3:
 - special demux only required for SMP

Changes in v2:
 - special demux code for __ipipe_handle_irq

 arch/x86/kernel/ipipe.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/ipipe.c b/arch/x86/kernel/ipipe.c
index b471355..b5b0966 100644
--- a/arch/x86/kernel/ipipe.c
+++ b/arch/x86/kernel/ipipe.c
@@ -289,7 +289,7 @@ void __init __ipipe_enable_pipeline(void)
 			     IPIPE_STDROOT_MASK);
 
 	ipipe_virtualize_irq(ipipe_root_domain,
-			     ipipe_apic_vector_irq(IRQ_MOVE_CLEANUP_VECTOR),
+			     IRQ_MOVE_CLEANUP_VECTOR,
 			     (ipipe_irq_handler_t)&smp_irq_move_cleanup_interrupt,
 			     NULL,
 			     &__ipipe_ack_apic,
@@ -311,7 +311,10 @@ void __init __ipipe_enable_pipeline(void)
 	 * IPIPE_SYSTEM_MASK has been passed for them, that's ok. */
 
 	for (irq = 0; irq < NR_IRQS; irq++)
-		/* Fails for IPIPE_CRITICAL_IPI but that's ok. */
+		/*
+		 * Fails for IPIPE_CRITICAL_IPI and IRQ_MOVE_CLEANUP_VECTOR,
+		 * but that's ok.
+		 */
 		ipipe_virtualize_irq(ipipe_root_domain,
 				     irq,
 				     (ipipe_irq_handler_t)&do_IRQ,
@@ -900,8 +903,12 @@ int __ipipe_handle_irq(struct pt_regs *regs)
 #ifdef CONFIG_X86_LOCAL_APIC
 		if (vector >= FIRST_SYSTEM_VECTOR)
 			irq = ipipe_apic_vector_irq(vector);
+#ifdef CONFIG_SMP
+		else if (vector == IRQ_MOVE_CLEANUP_VECTOR)
+			irq = vector;
+#endif /* CONFIG_SMP */
 		else
-#endif
+#endif /* CONFIG_X86_LOCAL_APIC */
 			irq = __get_cpu_var(vector_irq)[vector];
 		m_ack = 0;
 	} else { /* This is a self-triggered one. */
-- 
1.6.0.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-28 17:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-28  9:51 [Adeos-main] [PATCH] x86: Fix virtualization of IRQ_MOVE_CLEANUP_VECTOR Jan Kiszka
2010-01-28 16:55 ` [Adeos-main] [PATCH v2] x86: Fix handling " Jan Kiszka
2010-01-28 17:12   ` [Adeos-main] [PATCH v3] " Jan Kiszka

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.