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-changelog

[Xen-changelog] [xen-unstable] Make sure we always have a sensible idle

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Make sure we always have a sensible idle function; this fixes problems
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 04 Jan 2007 06:10:08 -0800
Delivery-date: Thu, 04 Jan 2007 06:10:07 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Make sure we always have a sensible idle function; this fixes problems, Xen patchbot-unstable <=