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

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [xenppc-unstable] [POWERPC][XEN] Make MPIC sharing between Xen and Dom0 optional
From: Xen patchbot-xenppc-unstable <patchbot-xenppc-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 31 Aug 2006 21:50:42 +0000
Delivery-date: Thu, 31 Aug 2006 15:20:44 -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 033d5a33092daee41320e74dd8d8d8fddffe15dc
# Parent  168867efb453d54f5decc73435965254e423bc68
[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>
---
 xen/arch/powerpc/mpic_init.c |   61 ++++++++++++++++++++++++++++---------------
 1 files changed, 40 insertions(+), 21 deletions(-)

diff -r 168867efb453 -r 033d5a33092d xen/arch/powerpc/mpic_init.c
--- a/xen/arch/powerpc/mpic_init.c      Thu Aug 31 09:10:36 2006 -0400
+++ b/xen/arch/powerpc/mpic_init.c      Thu Aug 31 17:47:11 2006 -0400
@@ -27,6 +27,8 @@
 #include "of-devtree.h"
 
 #undef DEBUG
+#define CONFIG_SHARE_MPIC
+
 #ifdef DEBUG
 #define DBG(fmt...) printk(fmt)
 #else
@@ -319,7 +321,42 @@ static int find_mpic(void)
     return rc;
 }
 
+#ifdef CONFIG_SHARE_MPIC
 static struct hw_interrupt_type hc_irq;
+
+static struct hw_interrupt_type *share_mpic(
+    struct hw_interrupt_type *mpic_irq,
+    struct hw_interrupt_type *xen_irq)
+{
+    hc_irq.startup = mpic_irq->startup;
+    mpic_irq->startup = xen_irq->startup;
+
+    hc_irq.enable = mpic_irq->enable;
+    mpic_irq->enable = xen_irq->enable;
+
+    hc_irq.disable = mpic_irq->disable;
+    mpic_irq->disable = xen_irq->disable;
+
+    hc_irq.shutdown = mpic_irq->shutdown;
+    mpic_irq->shutdown = xen_irq->shutdown;
+
+    hc_irq.ack = mpic_irq->ack;
+    mpic_irq->ack = xen_irq->ack;
+
+    hc_irq.end = mpic_irq->end;
+    mpic_irq->end = xen_irq->end;
+
+    hc_irq.set_affinity = mpic_irq->set_affinity;
+    mpic_irq->set_affinity = xen_irq->set_affinity;
+
+    return &hc_irq;
+}
+
+#else  /* CONFIG_SHARE_MPIC */
+
+#define share_mpic(M,X) (M)
+
+#endif
 
 struct hw_interrupt_type *xen_mpic_init(struct hw_interrupt_type *xen_irq)
 {
@@ -329,6 +366,7 @@ struct hw_interrupt_type *xen_mpic_init(
     unsigned int ipi_offset;
     unsigned char *senses;
     unsigned int senses_count;
+    struct hw_interrupt_type *hit;
 
     printk("%s: start\n", __func__);
 
@@ -356,29 +394,10 @@ struct hw_interrupt_type *xen_mpic_init(
     BUG_ON(mpic == NULL);
     mpic_init(mpic);
 
-    hc_irq.startup = mpic->hc_irq.startup;
-    mpic->hc_irq.startup = xen_irq->startup;
-
-    hc_irq.enable = mpic->hc_irq.enable;
-    mpic->hc_irq.enable = xen_irq->enable;
-
-    hc_irq.disable = mpic->hc_irq.disable;
-    mpic->hc_irq.disable = xen_irq->disable;
-
-    hc_irq.shutdown = mpic->hc_irq.shutdown;
-    mpic->hc_irq.shutdown = xen_irq->shutdown;
-
-    hc_irq.ack = mpic->hc_irq.ack;
-    mpic->hc_irq.ack = xen_irq->ack;
-
-    hc_irq.end = mpic->hc_irq.end;
-    mpic->hc_irq.end = xen_irq->end;
-
-    hc_irq.set_affinity = mpic->hc_irq.set_affinity;
-    mpic->hc_irq.set_affinity = xen_irq->set_affinity;
+    hit = share_mpic(&mpic->hc_irq, xen_irq);
 
     printk("%s: success\n", __func__);
-    return &hc_irq;
+    return hit;
 }
 
 int xen_mpic_get_irq(struct cpu_user_regs *regs)

_______________________________________________
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] [POWERPC][XEN] Make MPIC sharing between Xen and Dom0 optional, Xen patchbot-xenppc-unstable <=