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

[Xen-changelog] [xen-unstable] [XEN][POWERPC] Keepin it cool: sleep the processor when halt fails



# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID 0f4c73a1e92a195bd90beff00c1e1c669e6f4a6a
# Parent  f7096a6728e61aa56282fa259d893e17b265b7e3
[XEN][POWERPC] Keepin it cool: sleep the processor when halt fails
Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
 xen/arch/powerpc/domain.c     |    6 +++---
 xen/arch/powerpc/exceptions.h |    3 +++
 xen/arch/powerpc/setup.c      |    2 --
 3 files changed, 6 insertions(+), 5 deletions(-)

diff -r f7096a6728e6 -r 0f4c73a1e92a xen/arch/powerpc/domain.c
--- a/xen/arch/powerpc/domain.c Fri Oct 06 12:15:06 2006 -0500
+++ b/xen/arch/powerpc/domain.c Wed Oct 04 14:06:14 2006 -0400
@@ -34,6 +34,7 @@
 #include <asm/current.h>
 #include <asm/hcalls.h>
 #include "rtas.h"
+#include "exceptions.h"
 
 #define next_arg(fmt, args) ({                                              \
     unsigned long __arg;                                                    \
@@ -47,7 +48,6 @@
     }                                                                       \
     __arg;                                                                  \
 })
-extern void idle_loop(void);
 
 unsigned long hypercall_create_continuation(unsigned int op,
         const char *format, ...)
@@ -99,7 +99,8 @@ static void machine_fail(const char *s)
 static void machine_fail(const char *s)
 {
     printf("%s failed, manual powercycle required!\n", s);
-    while(1);
+    for (;;)
+        sleep();
 }
 
 void machine_halt(void)
@@ -302,7 +303,6 @@ void arch_dump_vcpu_info(struct vcpu *v)
 {
 }
 
-extern void sleep(void);
 static void safe_halt(void)
 {
     int cpu = smp_processor_id();
diff -r f7096a6728e6 -r 0f4c73a1e92a xen/arch/powerpc/exceptions.h
--- a/xen/arch/powerpc/exceptions.h     Fri Oct 06 12:15:06 2006 -0500
+++ b/xen/arch/powerpc/exceptions.h     Wed Oct 04 14:06:14 2006 -0400
@@ -43,8 +43,11 @@ extern void program_exception(
     struct cpu_user_regs *regs, unsigned long cookie);
 
 extern long xen_hvcall_jump(struct cpu_user_regs *regs, ulong address);
+
 extern void *mambo_memset(void *, int, ulong);
 extern void *mambo_memcpy(void *, const void *, ulong);
+extern void sleep(void);
+extern void idle_loop(void);
 
 extern ulong *__hypercall_table[];
 
diff -r f7096a6728e6 -r 0f4c73a1e92a xen/arch/powerpc/setup.c
--- a/xen/arch/powerpc/setup.c  Fri Oct 06 12:15:06 2006 -0500
+++ b/xen/arch/powerpc/setup.c  Wed Oct 04 14:06:14 2006 -0400
@@ -196,8 +196,6 @@ static void __init start_of_day(void)
     schedulers_start();
 }
 
-extern void idle_loop(void);
-
 void startup_cpu_idle_loop(void)
 {
     struct vcpu *v = current;

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