direct-io.hg

changeset 12939:0f4c73a1e92a

[XEN][POWERPC] Keepin it cool: sleep the processor when halt fails
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Jimi Xenidis <jimix@watson.ibm.com>
date Wed Oct 04 14:06:14 2006 -0400 (2006-10-04)
parents f7096a6728e6
children 4a2a96e72076
files xen/arch/powerpc/domain.c xen/arch/powerpc/exceptions.h xen/arch/powerpc/setup.c
line diff
     1.1 --- a/xen/arch/powerpc/domain.c	Fri Oct 06 12:15:06 2006 -0500
     1.2 +++ b/xen/arch/powerpc/domain.c	Wed Oct 04 14:06:14 2006 -0400
     1.3 @@ -34,6 +34,7 @@
     1.4  #include <asm/current.h>
     1.5  #include <asm/hcalls.h>
     1.6  #include "rtas.h"
     1.7 +#include "exceptions.h"
     1.8  
     1.9  #define next_arg(fmt, args) ({                                              \
    1.10      unsigned long __arg;                                                    \
    1.11 @@ -47,7 +48,6 @@
    1.12      }                                                                       \
    1.13      __arg;                                                                  \
    1.14  })
    1.15 -extern void idle_loop(void);
    1.16  
    1.17  unsigned long hypercall_create_continuation(unsigned int op,
    1.18          const char *format, ...)
    1.19 @@ -99,7 +99,8 @@ void arch_domain_destroy(struct domain *
    1.20  static void machine_fail(const char *s)
    1.21  {
    1.22      printf("%s failed, manual powercycle required!\n", s);
    1.23 -    while(1);
    1.24 +    for (;;)
    1.25 +        sleep();
    1.26  }
    1.27  
    1.28  void machine_halt(void)
    1.29 @@ -302,7 +303,6 @@ void arch_dump_vcpu_info(struct vcpu *v)
    1.30  {
    1.31  }
    1.32  
    1.33 -extern void sleep(void);
    1.34  static void safe_halt(void)
    1.35  {
    1.36      int cpu = smp_processor_id();
     2.1 --- a/xen/arch/powerpc/exceptions.h	Fri Oct 06 12:15:06 2006 -0500
     2.2 +++ b/xen/arch/powerpc/exceptions.h	Wed Oct 04 14:06:14 2006 -0400
     2.3 @@ -43,8 +43,11 @@ extern void program_exception(
     2.4      struct cpu_user_regs *regs, unsigned long cookie);
     2.5  
     2.6  extern long xen_hvcall_jump(struct cpu_user_regs *regs, ulong address);
     2.7 +
     2.8  extern void *mambo_memset(void *, int, ulong);
     2.9  extern void *mambo_memcpy(void *, const void *, ulong);
    2.10 +extern void sleep(void);
    2.11 +extern void idle_loop(void);
    2.12  
    2.13  extern ulong *__hypercall_table[];
    2.14  
     3.1 --- a/xen/arch/powerpc/setup.c	Fri Oct 06 12:15:06 2006 -0500
     3.2 +++ b/xen/arch/powerpc/setup.c	Wed Oct 04 14:06:14 2006 -0400
     3.3 @@ -196,8 +196,6 @@ static void __init start_of_day(void)
     3.4      schedulers_start();
     3.5  }
     3.6  
     3.7 -extern void idle_loop(void);
     3.8 -
     3.9  void startup_cpu_idle_loop(void)
    3.10  {
    3.11      struct vcpu *v = current;