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][XEN][POWERPC] remove mpic pointer hack.

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [linux-ppc-2.6] [LINUX][XEN][POWERPC] remove mpic pointer hack.
From: Xen patchbot-linux-ppc-2.6 <patchbot-linux-ppc-2.6@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 17 Oct 2006 21:11:23 +0000
Delivery-date: Tue, 17 Oct 2006 14:18:49 -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 968ced1469e8cbf36d00f437ac084bf064f6df00
# Parent  ad4044d0582162bf98e21bbe6a9c5c3d400e659f
[LINUX][XEN][POWERPC] remove mpic pointer hack.

Since we now allocate the mpic in this file we can get it here rather
than use the hack to get it.

Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
---
 arch/powerpc/platforms/xen/evtchn.c |   22 ++++++++--------------
 1 files changed, 8 insertions(+), 14 deletions(-)

diff -r ad4044d05821 -r 968ced1469e8 arch/powerpc/platforms/xen/evtchn.c
--- a/arch/powerpc/platforms/xen/evtchn.c       Tue Oct 17 17:01:57 2006 -0400
+++ b/arch/powerpc/platforms/xen/evtchn.c       Tue Oct 17 17:03:31 2006 -0400
@@ -30,7 +30,7 @@
  */
 
 
-struct hw_interrupt_type *xen_pirq;
+static struct hw_interrupt_type *xen_pirq;
 static struct hw_interrupt_type hc_irq;
 
 static unsigned int xen_startup_irq(unsigned int irq)
@@ -60,7 +60,8 @@ static void xen_ack_irq(unsigned int irq
 static void xen_ack_irq(unsigned int irq)
 {
        xen_pirq->ack(irq);
-       if (hc_irq.ack) hc_irq.ack(irq);
+       if (hc_irq.ack)
+               hc_irq.ack(irq);
 }
 static void xen_end_irq(unsigned int irq)
 {
@@ -68,14 +69,8 @@ static void xen_end_irq(unsigned int irq
        hc_irq.end(irq);
 }
 
-/* Get the mpic structure from the irq number */
-static inline struct mpic *mpic_from_irq(unsigned int irq)
-{
-       return container_of(irq_desc[irq].chip, struct mpic, hc_irq);
-}
-
 /* borrowed from platform/maple/setup.c */
-static __init void xen_share_maple_init_IRQ(void)
+static __init struct mpic *xen_share_maple_init_IRQ(void)
 {
        struct device_node *root;
        unsigned int *opprop;
@@ -112,6 +107,8 @@ static __init void xen_share_maple_init_
        mpic_init(mpic);
 
        DBG(" <- %s\n", __func__);
+
+       return mpic;
 }
 
 static void xen_share_pic(void)
@@ -119,10 +116,7 @@ static void xen_share_pic(void)
        struct mpic *mpic;
 
        xen_pirq = irq_desc[0].chip;
-       xen_share_maple_init_IRQ();
-
-       /* FIXME: 0 may not be valid */
-       mpic = mpic_from_irq(0);
+       mpic = xen_share_maple_init_IRQ();
 
        hc_irq.startup = mpic->hc_irq.startup;
        mpic->hc_irq.startup = xen_startup_irq;
@@ -150,7 +144,7 @@ void xen_maple_init_IRQ(void)
        if (!(xen_start_info->flags & SIF_INITDOMAIN))
                return;
 
-       printk("Sharing PIC with Xen");
+       printk("Sharing PIC with Xen\n");
        xen_share_pic();
 }
 

_______________________________________________
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][XEN][POWERPC] remove mpic pointer hack., Xen patchbot-linux-ppc-2 . 6 <=