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] [LINUX][POWERPC] merge

# HG changeset patch
# User Hollis Blanchard <hollisb@xxxxxxxxxx>
# Node ID 0d95131b439ee28d514f637b30f6034b8b5fb8a6
# Parent  e5b6c025d4d20a24555275fb3c1da40edeac72d5
# Parent  a2d836b6ab41c273826bfba8ebe30ac63f153e93
[LINUX][POWERPC] merge
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
 arch/powerpc/platforms/xen/evtchn.c |   36 +++++++++++++++++++++---------------
 arch/powerpc/platforms/xen/setup.c  |    5 +++++
 2 files changed, 26 insertions(+), 15 deletions(-)

diff -r e5b6c025d4d2 -r 0d95131b439e arch/powerpc/platforms/xen/evtchn.c
--- a/arch/powerpc/platforms/xen/evtchn.c       Tue Sep 05 17:55:43 2006 -0500
+++ b/arch/powerpc/platforms/xen/evtchn.c       Tue Sep 05 18:00:40 2006 -0500
@@ -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 e5b6c025d4d2 -r 0d95131b439e arch/powerpc/platforms/xen/setup.c
--- a/arch/powerpc/platforms/xen/setup.c        Tue Sep 05 17:55:43 2006 -0500
+++ b/arch/powerpc/platforms/xen/setup.c        Tue Sep 05 18:00:40 2006 -0500
@@ -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] [LINUX][POWERPC] merge, Xen patchbot-linux-ppc-2 . 6 <=