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] [IA64] Add several missing is_running_on_xen(

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [xenppc-unstable] [IA64] Add several missing is_running_on_xen().
From: Xen patchbot-xenppc-unstable <patchbot-xenppc-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 02 Jun 2006 17:56:37 +0000
Delivery-date: Fri, 02 Jun 2006 10:58:29 -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 awilliam@xxxxxxxxxxx
# Node ID 3be4c828873766eb580541b2f977f01a72431991
# Parent  003157eafd66014f525c21f5e0688760e66ca597
[IA64] Add several missing is_running_on_xen().

Signed-off-by Kevin Tian <kevin.tian@xxxxxxxxx>
---
 linux-2.6-xen-sparse/arch/ia64/kernel/iosapic.c  |    7 +++--
 linux-2.6-xen-sparse/arch/ia64/kernel/irq_ia64.c |   30 ++++++++++++-----------
 linux-2.6-xen-sparse/arch/ia64/kernel/setup.c    |    3 +-
 3 files changed, 23 insertions(+), 17 deletions(-)

diff -r 003157eafd66 -r 3be4c8288737 
linux-2.6-xen-sparse/arch/ia64/kernel/iosapic.c
--- a/linux-2.6-xen-sparse/arch/ia64/kernel/iosapic.c   Wed May 31 11:29:50 
2006 -0600
+++ b/linux-2.6-xen-sparse/arch/ia64/kernel/iosapic.c   Wed May 31 11:30:07 
2006 -0600
@@ -670,7 +670,11 @@ register_intr (unsigned int gsi, int vec
        iosapic_intr_info[vector].dmode    = delivery;
        iosapic_intr_info[vector].trigger  = trigger;
 
-#ifndef CONFIG_XEN
+#ifdef CONFIG_XEN
+       if (is_running_on_xen())
+               return 0;
+#endif
+
        if (trigger == IOSAPIC_EDGE)
                irq_type = &irq_type_iosapic_edge;
        else
@@ -683,7 +687,6 @@ register_intr (unsigned int gsi, int vec
                               __FUNCTION__, vector, idesc->handler->typename, 
irq_type->typename);
                idesc->handler = irq_type;
        }
-#endif
        return 0;
 }
 
diff -r 003157eafd66 -r 3be4c8288737 
linux-2.6-xen-sparse/arch/ia64/kernel/irq_ia64.c
--- a/linux-2.6-xen-sparse/arch/ia64/kernel/irq_ia64.c  Wed May 31 11:29:50 
2006 -0600
+++ b/linux-2.6-xen-sparse/arch/ia64/kernel/irq_ia64.c  Wed May 31 11:30:07 
2006 -0600
@@ -254,7 +254,8 @@ static int xen_slab_ready = 0;
  * it ends up to issue several memory accesses upon percpu data and
  * thus adds unnecessary traffic to other paths.
  */
-irqreturn_t handle_reschedule(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t
+handle_reschedule(int irq, void *dev_id, struct pt_regs *regs)
 {
 
        return IRQ_HANDLED;
@@ -328,7 +329,7 @@ xen_register_percpu_irq (unsigned int ir
        }
 }
 
-void
+static void
 xen_bind_early_percpu_irq (void)
 {
        int i;
@@ -398,19 +399,20 @@ init_IRQ (void)
 {
 #ifdef CONFIG_XEN
        /* Maybe put into platform_irq_init later */
-       struct callback_register event = {
-               .type = CALLBACKTYPE_event,
-               .address = (unsigned long)&xen_event_callback,
-       };
-       xen_init_IRQ();
-       BUG_ON(HYPERVISOR_callback_op(CALLBACKOP_register, &event));
-       late_time_init = xen_bind_early_percpu_irq;
-#ifdef CONFIG_SMP
-       register_percpu_irq(IA64_IPI_RESCHEDULE, &resched_irqaction);
-#endif
-#else /* CONFIG_XEN */
+       if (is_running_on_xen()) {
+               struct callback_register event = {
+                       .type = CALLBACKTYPE_event,
+                       .address = (unsigned long)&xen_event_callback,
+               };
+               xen_init_IRQ();
+               BUG_ON(HYPERVISOR_callback_op(CALLBACKOP_register, &event));
+               late_time_init = xen_bind_early_percpu_irq;
+#ifdef CONFIG_SMP
+               register_percpu_irq(IA64_IPI_RESCHEDULE, &resched_irqaction);
+#endif /* CONFIG_SMP */
+       }
+#endif /* CONFIG_XEN */
        register_percpu_irq(IA64_SPURIOUS_INT_VECTOR, NULL);
-#endif /* CONFIG_XEN */
 #ifdef CONFIG_SMP
        register_percpu_irq(IA64_IPI_VECTOR, &ipi_irqaction);
 #endif
diff -r 003157eafd66 -r 3be4c8288737 
linux-2.6-xen-sparse/arch/ia64/kernel/setup.c
--- a/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c     Wed May 31 11:29:50 
2006 -0600
+++ b/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c     Wed May 31 11:30:07 
2006 -0600
@@ -925,7 +925,8 @@ cpu_init (void)
        platform_cpu_init();
 #ifdef CONFIG_XEN
        /* Need to be moved into platform_cpu_init later */
-       xen_smp_intr_init();
+       if (is_running_on_xen())
+               xen_smp_intr_init();
 #endif
        pm_idle = default_idle;
 }

_______________________________________________
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] [IA64] Add several missing is_running_on_xen()., Xen patchbot-xenppc-unstable <=