ia64/xen-unstable
changeset 13253:338ceb7b1f09
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@xensource.com>
booting dom0 on AMD introduced by -unstable cset 13213:bf25488db8eb.
Signed-off-by: Steven Hand <steven@xensource.com>
author | Steven Hand <steven@xensource.com> |
---|---|
date | Thu Jan 04 10:58:01 2007 +0000 (2007-01-04) |
parents | 60e50c65f862 |
children | f3c3f9bd798e |
files | linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c |
line diff
1.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c Thu Jan 04 10:20:45 2007 +0000 1.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c Thu Jan 04 10:58:01 2007 +0000 1.3 @@ -168,17 +168,22 @@ void cpu_idle(void) 1.4 /* endless idle loop with no priority at all */ 1.5 while (1) { 1.6 while (!need_resched()) { 1.7 + void (*idle)(void); 1.8 1.9 if (__get_cpu_var(cpu_idle_state)) 1.10 __get_cpu_var(cpu_idle_state) = 0; 1.11 1.12 rmb(); 1.13 + idle = pm_idle; 1.14 + 1.15 + if (!idle) 1.16 + idle = xen_idle; 1.17 1.18 if (cpu_is_offline(cpu)) 1.19 play_dead(); 1.20 1.21 __get_cpu_var(irq_stat).idle_timestamp = jiffies; 1.22 - pm_idle(); 1.23 + idle(); 1.24 } 1.25 preempt_enable_no_resched(); 1.26 schedule(); 1.27 @@ -216,8 +221,6 @@ EXPORT_SYMBOL_GPL(cpu_idle_wait); 1.28 1.29 void __devinit select_idle_routine(const struct cpuinfo_x86 *c) 1.30 { 1.31 - if (!pm_idle) 1.32 - pm_idle = xen_idle; 1.33 } 1.34 1.35 static int __init idle_setup (char *str)
2.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c Thu Jan 04 10:20:45 2007 +0000 2.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c Thu Jan 04 10:58:01 2007 +0000 2.3 @@ -182,14 +182,18 @@ void cpu_idle (void) 2.4 /* endless idle loop with no priority at all */ 2.5 while (1) { 2.6 while (!need_resched()) { 2.7 + void (*idle)(void); 2.8 + 2.9 if (__get_cpu_var(cpu_idle_state)) 2.10 __get_cpu_var(cpu_idle_state) = 0; 2.11 rmb(); 2.12 - 2.13 + idle = pm_idle; 2.14 + if (!idle) 2.15 + idle = xen_idle; 2.16 if (cpu_is_offline(smp_processor_id())) 2.17 play_dead(); 2.18 enter_idle(); 2.19 - pm_idle(); 2.20 + idle(); 2.21 __exit_idle(); 2.22 } 2.23 2.24 @@ -230,8 +234,6 @@ EXPORT_SYMBOL_GPL(cpu_idle_wait); 2.25 2.26 void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c) 2.27 { 2.28 - if (!pm_idle) 2.29 - pm_idle = xen_idle; 2.30 } 2.31 2.32 static int __init idle_setup (char *str)