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] [POWERPC][XEN] Make MPIC sharing between Xen an

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [linux-ppc-2.6] [POWERPC][XEN] Make MPIC sharing between Xen and Dom0 optional
From: Xen patchbot-linux-ppc-2.6 <patchbot-linux-ppc-2.6@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 31 Aug 2006 21:51:47 +0000
Delivery-date: Thu, 31 Aug 2006 15:20:45 -0700
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 a2d836b6ab41c273826bfba8ebe30ac63f153e93
# Parent  199b457c43256143561ea7943d40ce72713c73b0
[POWERPC][XEN] Make MPIC sharing between Xen and Dom0 optional

Tho right now it is the only option.

Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
---
 arch/powerpc/platforms/xen/evtchn.c |   36 +++++++++++++++++++++---------------
 arch/powerpc/platforms/xen/setup.c  |    5 +++++
 2 files changed, 26 insertions(+), 15 deletions(-)

diff -r 199b457c4325 -r a2d836b6ab41 arch/powerpc/platforms/xen/evtchn.c
--- a/arch/powerpc/platforms/xen/evtchn.c       Mon Aug 28 18:43:52 2006 -0500
+++ b/arch/powerpc/platforms/xen/evtchn.c       Thu Aug 31 17:47:08 2006 -0400
@@ -1,4 +1,3 @@
-
 #define DEBUG
 
 #include <linux/module.h>
@@ -16,8 +15,10 @@
 #endif
 
 /*
- * We are currently letting Dom0 control the mpic. However, Xen will
- * Ack all interrupts. Here is how it works:
+ * The following code, shares the MPIV controller between Xen and
+ * Dom0. However, Xen will Ack all interrupts. Here is how it works:
+ * the controlling of the PIC with Dom0. However, Xen will Ack all
+ * interrupts. Here is how it works:
  *
  *   1. Dom0 sees a device and uses the and requests that Xen binds
  *      the IRQ to it.
@@ -32,12 +33,6 @@ struct hw_interrupt_type *xen_pirq;
 struct hw_interrupt_type *xen_pirq;
 static struct hw_interrupt_type hc_irq;
 extern struct machdep_calls mach_maple_md;
-
-int xen_get_irq(struct pt_regs *regs)
-{
-       evtchn_do_upcall(regs);
-       return -1;
-}
 
 static unsigned int xen_startup_irq(unsigned int irq)
 {
@@ -80,14 +75,9 @@ static inline struct mpic *mpic_from_irq
        return container_of(irq_desc[irq].chip, struct mpic, hc_irq);
 }
 
-void xen_maple_init_IRQ(void)
+static void xen_share_pic(void)
 {
        struct mpic *mpic;
-
-       xen_init_IRQ();
-
-       if (!(xen_start_info->flags & SIF_INITDOMAIN))
-               return;
 
        xen_pirq = irq_desc[0].chip;
        mach_maple_md.init_IRQ();
@@ -112,5 +102,21 @@ void xen_maple_init_IRQ(void)
 
        hc_irq.end = mpic->hc_irq.end;
        mpic->hc_irq.end = xen_end_irq;
+}
 
+void xen_maple_init_IRQ(void)
+{
+       xen_init_IRQ();
+
+       if (!(xen_start_info->flags & SIF_INITDOMAIN))
+               return;
+
+       printk("Sharing PIC with Xen");
+       xen_share_pic();
 }
+
+int xen_get_irq(struct pt_regs *regs)
+{
+       evtchn_do_upcall(regs);
+       return -1;
+}
diff -r 199b457c4325 -r a2d836b6ab41 arch/powerpc/platforms/xen/setup.c
--- a/arch/powerpc/platforms/xen/setup.c        Mon Aug 28 18:43:52 2006 -0500
+++ b/arch/powerpc/platforms/xen/setup.c        Thu Aug 31 17:47:08 2006 -0400
@@ -1,6 +1,7 @@
 
 #define DEBUG
 #undef XENPPC_USE_IDLE
+#define CONFIG_SHARE_MPIC
 
 #include <linux/module.h>
 #include <linux/rwsem.h>
@@ -298,7 +299,11 @@ define_machine(xen) {
        .probe                  = xen_probe,
        .setup_arch             = xen_setup_arch,
        .init_early             = xen_init_early,
+#ifdef CONFIG_SHARE_MPIC
        .init_IRQ               = xen_maple_init_IRQ,
+#else
+       .init_IRQ               = xen_init_IRQ,
+#endif
        .get_irq                = xen_get_irq,
        .get_boot_time          = 0,
        .set_rtc_time           = 0,

_______________________________________________
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] [POWERPC][XEN] Make MPIC sharing between Xen and Dom0 optional, Xen patchbot-linux-ppc-2 . 6 <=