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] [xenppc-unstable] [XEN][POWERPC] Generalized parallel IPI handl

To: xen-ppc-devel <xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [XenPPC] [xenppc-unstable] [XEN][POWERPC] Generalized parallel IPI handlers
From: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Date: Tue, 28 Nov 2006 17:08:07 -0500
Delivery-date: Tue, 28 Nov 2006 14:08:06 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <mailman.1753.1164751278.1458.xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
References: <mailman.1753.1164751278.1458.xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx

# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID 1e1a63408129bea2d87f485c52f1be21ada35ff0
# Parent  a2a4a6bdc5cdedf3fe90626de9b16c9ee898f178
[XEN][POWERPC] 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>
Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
---
 xen/arch/powerpc/external.c   |    6 ++----
 xen/arch/powerpc/mpic_init.c  |    6 ------
 xen/include/asm-powerpc/smp.h |    1 -
 3 files changed, 2 insertions(+), 11 deletions(-)

diff -r a2a4a6bdc5cd -r 1e1a63408129 xen/arch/powerpc/external.c
--- a/xen/arch/powerpc/external.c       Tue Nov 28 16:43:53 2006 -0500
+++ b/xen/arch/powerpc/external.c       Tue Nov 28 16:56:40 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 a2a4a6bdc5cd -r 1e1a63408129 xen/arch/powerpc/mpic_init.c
--- a/xen/arch/powerpc/mpic_init.c      Tue Nov 28 16:43:53 2006 -0500
+++ b/xen/arch/powerpc/mpic_init.c      Tue Nov 28 16:56:40 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 a2a4a6bdc5cd -r 1e1a63408129 xen/include/asm-powerpc/smp.h
--- a/xen/include/asm-powerpc/smp.h     Tue Nov 28 16:43:53 2006 -0500
+++ b/xen/include/asm-powerpc/smp.h     Tue Nov 28 16:56:40 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

<Prev in Thread] Current Thread [Next in Thread>
  • [XenPPC] [xenppc-unstable] [XEN][POWERPC] Generalized parallel IPI handlers, Jimi Xenidis <=