[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [IA64] Add several missing is_running_on_xen().



# 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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.