[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XenPPC] [PATCH] Skip reset of IPI vectors



Rather than try to make a xen_mpic_init and duplicate all the associated
machinery it pulls in, this patch introduces a feature flag.  I tried
the first approach, and it results in a lot of code duplication, which
is a worse maintenence burden than this, I believe.

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

 arch/powerpc/platforms/xen/evtchn.c |    1 +
 arch/powerpc/sysdev/mpic.c          |    2 +-
 include/asm-powerpc/mpic.h          |    2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)

diff -r f0be2cc05103 arch/powerpc/platforms/xen/evtchn.c
--- a/arch/powerpc/platforms/xen/evtchn.c       Fri Oct 13 12:36:39 2006 -0400
+++ b/arch/powerpc/platforms/xen/evtchn.c       Fri Oct 13 18:39:46 2006 -0400
@@ -106,6 +106,7 @@ static __init void xen_share_maple_init_
 
        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 f0be2cc05103 arch/powerpc/sysdev/mpic.c
--- a/arch/powerpc/sysdev/mpic.c        Fri Oct 13 12:36:39 2006 -0400
+++ b/arch/powerpc/sysdev/mpic.c        Fri Oct 13 18:38:07 2006 -0400
@@ -743,7 +743,7 @@ void __init mpic_init(struct mpic *mpic)
 
        /* Initialize IPIs to our reserved vectors and mark them disabled for 
now */
        mpic_test_broken_ipi(mpic);
-       for (i = 0; i < 4; i++) {
+       for (i = 0; i < 4 && !(mpic->flags & MPIC_SKIP_IPI_INIT); i++) {
                mpic_ipi_write(i,
                               MPIC_VECPRI_MASK |
                               (10 << MPIC_VECPRI_PRIORITY_SHIFT) |
diff -r f0be2cc05103 include/asm-powerpc/mpic.h
--- a/include/asm-powerpc/mpic.h        Fri Oct 13 12:36:39 2006 -0400
+++ b/include/asm-powerpc/mpic.h        Fri Oct 13 18:38:13 2006 -0400
@@ -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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.