[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [XenPPC] [linux-ppc-2.6] [LINUX][XEN][POWERPC] remove mpic pointer hack.
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |