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

[Xen-changelog] [xen-unstable] Make sure we always have a sensible idle function; this fixes problems



# HG changeset patch
# User Steven Hand <steven@xxxxxxxxxxxxx>
# Date 1167908281 0
# Node ID 338ceb7b1f0993bf9735c0c1c5d21e39c381cf2f
# Parent  60e50c65f862ba8035441352c44019d117996948
Make sure we always have a sensible idle function; this fixes problems
booting dom0 on AMD introduced by -unstable cset 13213:bf25488db8eb.

Signed-off-by: Steven Hand <steven@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c   |    9 ++++++---
 linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c |   10 ++++++----
 2 files changed, 12 insertions(+), 7 deletions(-)

diff -r 60e50c65f862 -r 338ceb7b1f09 
linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c       Thu Jan 04 
10:20:45 2007 +0000
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c       Thu Jan 04 
10:58:01 2007 +0000
@@ -168,17 +168,22 @@ void cpu_idle(void)
        /* endless idle loop with no priority at all */
        while (1) {
                while (!need_resched()) {
+                       void (*idle)(void);
 
                        if (__get_cpu_var(cpu_idle_state))
                                __get_cpu_var(cpu_idle_state) = 0;
 
                        rmb();
+                       idle = pm_idle;
+
+                       if (!idle)
+                               idle = xen_idle;
 
                        if (cpu_is_offline(cpu))
                                play_dead();
 
                        __get_cpu_var(irq_stat).idle_timestamp = jiffies;
-                       pm_idle();
+                       idle();
                }
                preempt_enable_no_resched();
                schedule();
@@ -216,8 +221,6 @@ EXPORT_SYMBOL_GPL(cpu_idle_wait);
 
 void __devinit select_idle_routine(const struct cpuinfo_x86 *c)
 {
-       if (!pm_idle)
-               pm_idle = xen_idle;
 }
 
 static int __init idle_setup (char *str)
diff -r 60e50c65f862 -r 338ceb7b1f09 
linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c     Thu Jan 04 
10:20:45 2007 +0000
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c     Thu Jan 04 
10:58:01 2007 +0000
@@ -182,14 +182,18 @@ void cpu_idle (void)
        /* endless idle loop with no priority at all */
        while (1) {
                while (!need_resched()) {
+                       void (*idle)(void);
+
                        if (__get_cpu_var(cpu_idle_state))
                                __get_cpu_var(cpu_idle_state) = 0;
                        rmb();
-                       
+                       idle = pm_idle;
+                       if (!idle)
+                               idle = xen_idle;
                        if (cpu_is_offline(smp_processor_id()))
                                play_dead();
                        enter_idle();
-                       pm_idle();
+                       idle();
                        __exit_idle();
                }
 
@@ -230,8 +234,6 @@ EXPORT_SYMBOL_GPL(cpu_idle_wait);
 
 void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c) 
 {
-       if (!pm_idle)
-               pm_idle = xen_idle;
 }
 
 static int __init idle_setup (char *str)

_______________________________________________
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®.