WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

[XenPPC] [PATCH] Generalized parallel IPI handlers

Our problem with x86 do_IRQ is that it does not respect IRQ_PER_CPU, so
make our logic reflect that generically.  We remove the spin lock in
this case, since the programming convention is to update irq descs
atomically (if at all).  This patch allows read_clocks to work properly.

Signed-off-by: Amos Waterland <apw@xxxxxxxxxx>

---

 arch/powerpc/external.c   |    6 ++----
 arch/powerpc/mpic_init.c  |    6 ------
 include/asm-powerpc/smp.h |    1 -
 3 files changed, 2 insertions(+), 11 deletions(-)

diff -r a8e67a19c325 xen/arch/powerpc/external.c
--- a/xen/arch/powerpc/external.c       Tue Nov 28 10:33:53 2006 -0500
+++ b/xen/arch/powerpc/external.c       Tue Nov 28 16:14:27 2006 -0500
@@ -82,15 +82,13 @@ void do_external(struct cpu_user_regs *r
 
     vec = xen_mpic_get_irq(regs);
 
-    if (vector_is_ipi(vec)) {
-        /* do_IRQ is fundamentally broken for reliable IPI delivery.  */
+    if (irq_desc[vec].status & IRQ_PER_CPU) {
+       /* x86 do_IRQ does not respect the per cpu flag.  */
         irq_desc_t *desc = &irq_desc[vec];
         regs->entry_vector = vec;
-        spin_lock(&desc->lock);
         desc->handler->ack(vec);
         desc->action->handler(vector_to_irq(vec), desc->action->dev_id, regs);
         desc->handler->end(vec);
-        spin_unlock(&desc->lock);
     } else if (vec != -1) {
         DBG("EE:0x%lx isrc: %d\n", regs->msr, vec);
         regs->entry_vector = vec;
diff -r a8e67a19c325 xen/arch/powerpc/mpic_init.c
--- a/xen/arch/powerpc/mpic_init.c      Tue Nov 28 10:33:53 2006 -0500
+++ b/xen/arch/powerpc/mpic_init.c      Tue Nov 28 16:14:15 2006 -0500
@@ -448,9 +448,3 @@ int xen_mpic_get_irq(struct cpu_user_reg
 
        return mpic_get_one_irq(mpic, regs);
 }
-
-int vector_is_ipi(int vector)
-{
-    BUG_ON(!mpic);
-    return (mpic->ipi_offset <= vector) && (vector < mpic->ipi_offset + 4);
-}
diff -r a8e67a19c325 xen/include/asm-powerpc/smp.h
--- a/xen/include/asm-powerpc/smp.h     Tue Nov 28 10:33:53 2006 -0500
+++ b/xen/include/asm-powerpc/smp.h     Tue Nov 28 16:14:19 2006 -0500
@@ -51,7 +51,6 @@ void smp_call_function_interrupt(struct 
 void smp_call_function_interrupt(struct cpu_user_regs *regs);
 void smp_event_check_interrupt(void);
 void send_IPI_mask(cpumask_t mask, int vector);
-int vector_is_ipi(int vector);
 
 #undef DEBUG_IPI
 #ifdef DEBUG_IPI

_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel