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] Make IPI handlers run in parallel

Make a copy of the vector information while protected by a lock, then
release the lock and use that information to acknowledge and act on the IPI.
We always have a consistent set of information in this case, as opposed
to the case of dropping and reaquiring the lock.  

This patch makes read_clocks work properly.

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

---

 external.c |   18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 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 13:28:18 2006 -0500
@@ -84,13 +84,25 @@ void do_external(struct cpu_user_regs *r
 
     if (vector_is_ipi(vec)) {
         /* do_IRQ is fundamentally broken for reliable IPI delivery.  */
+        void (*ack)(unsigned int irq);
+        void (*handler)(int, void *, struct cpu_user_regs *);
+        void (*end)(unsigned int irq);
+        int irq;
+        void *dev_id;
         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);
+        ack = desc->handler->ack;
+        handler = desc->action->handler;
+        end = desc->handler->end;
+        irq = vector_to_irq(vec);
+        dev_id = desc->action->dev_id;
         spin_unlock(&desc->lock);
+
+        ack(vec);
+        handler(irq, dev_id, regs);
+        end(vec);
     } else if (vec != -1) {
         DBG("EE:0x%lx isrc: %d\n", regs->msr, vec);
         regs->entry_vector = vec;

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