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] [linux-ppc-2.6] [XEN][POWERPC] Make Linux bail out of IPI vecto

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [linux-ppc-2.6] [XEN][POWERPC] Make Linux bail out of IPI vector reset
From: Xen patchbot-linux-ppc-2.6 <patchbot-linux-ppc-2.6@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 22 Nov 2006 20:03:04 +0000
Delivery-date: Wed, 22 Nov 2006 12:07:12 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Reply-to: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID c8d1f32fd7deebb9c15e5dc4ec3bcbd3678d9488
# Parent  05367b79152a01edbcc3a834c1f6d5328635435b
[XEN][POWERPC] Make Linux bail out of IPI vector reset

Xen/PPC currently shares the mpic with dom0 Linux.  In order for
interprocessor interrupts to work, we cannot allow Linux to reset the
mpic (a patch for the latter was already merged) nor to reset the IPI
vectors and change their priority.

This patch introduces a feature flag, rather than trying to code a new
function called xen_mpic_init and duplicating all the associated
machinery it pulls in.  I tried the first approach, and it results in a
lot of code duplication, which is a worse maintenence burden than this,
I believe.  Jimi may not like this approach, but I believe it is the
best solution until we completely virtualize the PIC at some point in
the future.

Signed-off-by: Amos Waterland <apw@xxxxxxxxxx>
Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
---
 arch/powerpc/platforms/xen/evtchn.c |    1 +
 arch/powerpc/sysdev/mpic.c          |    4 ++++
 include/asm-powerpc/mpic.h          |    2 ++
 3 files changed, 7 insertions(+)

diff -r 05367b79152a -r c8d1f32fd7de arch/powerpc/platforms/xen/evtchn.c
--- a/arch/powerpc/platforms/xen/evtchn.c       Tue Nov 21 09:35:16 2006 -0500
+++ b/arch/powerpc/platforms/xen/evtchn.c       Wed Nov 22 14:51:54 2006 -0500
@@ -101,6 +101,7 @@ static __init struct mpic *xen_share_map
 
        mpic = mpic_alloc(opic_addr,
                          MPIC_PRIMARY | MPIC_BIG_ENDIAN |
+                         MPIC_SKIP_IPI_INIT |
                          MPIC_BROKEN_U3 /* | MPIC_WANTS_RESET */,
                          0, 0, 128, 128, senses, 128, "Xen-U3-MPIC");
        BUG_ON(mpic == NULL);
diff -r 05367b79152a -r c8d1f32fd7de arch/powerpc/sysdev/mpic.c
--- a/arch/powerpc/sysdev/mpic.c        Tue Nov 21 09:35:16 2006 -0500
+++ b/arch/powerpc/sysdev/mpic.c        Wed Nov 22 14:51:54 2006 -0500
@@ -741,6 +741,9 @@ void __init mpic_init(struct mpic *mpic)
                           (MPIC_VEC_TIMER_0 + i));
        }
 
+       if (mpic->flags & MPIC_SKIP_IPI_INIT)
+               goto ipi_bailout;
+
        /* Initialize IPIs to our reserved vectors and mark them disabled for 
now */
        mpic_test_broken_ipi(mpic);
        for (i = 0; i < 4; i++) {
@@ -756,6 +759,7 @@ void __init mpic_init(struct mpic *mpic)
 #endif /* CONFIG_SMP */
        }
 
+ipi_bailout:
        /* Initialize interrupt sources */
        if (mpic->irq_count == 0)
                mpic->irq_count = mpic->num_sources;
diff -r 05367b79152a -r c8d1f32fd7de include/asm-powerpc/mpic.h
--- a/include/asm-powerpc/mpic.h        Tue Nov 21 09:35:16 2006 -0500
+++ b/include/asm-powerpc/mpic.h        Wed Nov 22 14:51:54 2006 -0500
@@ -190,6 +190,8 @@ struct mpic
 #define MPIC_BROKEN_IPI                        0x00000008
 /* MPIC wants a reset */
 #define MPIC_WANTS_RESET               0x00000010
+/* Skip reset of IPI vectors during init */
+#define MPIC_SKIP_IPI_INIT             0x00000020
 
 /* Allocate the controller structure and setup the linux irq descs
  * for the range if interrupts passed in. No HW initialization is

_______________________________________________
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] [linux-ppc-2.6] [XEN][POWERPC] Make Linux bail out of IPI vector reset, Xen patchbot-linux-ppc-2 . 6 <=