ia64/xen-unstable

changeset 9617:be0a1f376223

Use machine_halt() where it makes sense, to halt all processors
rather than just the current one.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Apr 06 16:41:53 2006 +0100 (2006-04-06)
parents 8970d080f719
children db44b783fe09
files xen/arch/x86/shutdown.c xen/arch/x86/traps.c xen/arch/x86/x86_32/traps.c xen/arch/x86/x86_64/traps.c xen/drivers/char/console.c
line diff
     1.1 --- a/xen/arch/x86/shutdown.c	Thu Apr 06 16:15:28 2006 +0100
     1.2 +++ b/xen/arch/x86/shutdown.c	Thu Apr 06 16:41:53 2006 +0100
     1.3 @@ -44,7 +44,7 @@ static inline void kb_wait(void)
     1.4  void __attribute__((noreturn)) __machine_halt(void *unused)
     1.5  {
     1.6      for ( ; ; )
     1.7 -        safe_halt();
     1.8 +        __asm__ __volatile__ ( "hlt" );
     1.9  }
    1.10  
    1.11  void machine_halt(void)
     2.1 --- a/xen/arch/x86/traps.c	Thu Apr 06 16:15:28 2006 +0100
     2.2 +++ b/xen/arch/x86/traps.c	Thu Apr 06 16:41:53 2006 +0100
     2.3 @@ -32,6 +32,7 @@
     2.4  #include <xen/errno.h>
     2.5  #include <xen/mm.h>
     2.6  #include <xen/console.h>
     2.7 +#include <xen/reboot.h>
     2.8  #include <asm/regs.h>
     2.9  #include <xen/delay.h>
    2.10  #include <xen/event.h>
    2.11 @@ -318,8 +319,7 @@ asmlinkage void fatal_trap(int trapnr, s
    2.12      console_force_lock();
    2.13  
    2.14      /* Wait for manual reset. */
    2.15 -    for ( ; ; )
    2.16 -        __asm__ __volatile__ ( "hlt" );
    2.17 +    machine_halt();
    2.18  }
    2.19  
    2.20  static inline int do_trap(int trapnr, char *str,
     3.1 --- a/xen/arch/x86/x86_32/traps.c	Thu Apr 06 16:15:28 2006 +0100
     3.2 +++ b/xen/arch/x86/x86_32/traps.c	Thu Apr 06 16:41:53 2006 +0100
     3.3 @@ -9,6 +9,7 @@
     3.4  #include <xen/mm.h>
     3.5  #include <xen/irq.h>
     3.6  #include <xen/symbols.h>
     3.7 +#include <xen/reboot.h>
     3.8  #include <asm/current.h>
     3.9  #include <asm/flushtlb.h>
    3.10  #include <asm/hvm/hvm.h>
    3.11 @@ -180,8 +181,7 @@ asmlinkage void do_double_fault(void)
    3.12      console_force_lock();
    3.13  
    3.14      /* Wait for manual reset. */
    3.15 -    for ( ; ; )
    3.16 -        __asm__ __volatile__ ( "hlt" );
    3.17 +    machine_halt();
    3.18  }
    3.19  
    3.20  unsigned long do_iret(void)
     4.1 --- a/xen/arch/x86/x86_64/traps.c	Thu Apr 06 16:15:28 2006 +0100
     4.2 +++ b/xen/arch/x86/x86_64/traps.c	Thu Apr 06 16:41:53 2006 +0100
     4.3 @@ -10,6 +10,7 @@
     4.4  #include <xen/symbols.h>
     4.5  #include <xen/console.h>
     4.6  #include <xen/sched.h>
     4.7 +#include <xen/reboot.h>
     4.8  #include <asm/current.h>
     4.9  #include <asm/flushtlb.h>
    4.10  #include <asm/msr.h>
    4.11 @@ -166,8 +167,7 @@ asmlinkage void do_double_fault(struct c
    4.12      console_force_lock();
    4.13  
    4.14      /* Wait for manual reset. */
    4.15 -    for ( ; ; )
    4.16 -        __asm__ __volatile__ ( "hlt" );
    4.17 +    machine_halt();
    4.18  }
    4.19  
    4.20  void toggle_guest_mode(struct vcpu *v)
     5.1 --- a/xen/drivers/char/console.c	Thu Apr 06 16:15:28 2006 +0100
     5.2 +++ b/xen/drivers/char/console.c	Thu Apr 06 16:41:53 2006 +0100
     5.3 @@ -520,6 +520,7 @@ void console_force_unlock(void)
     5.4  {
     5.5      console_lock = SPIN_LOCK_UNLOCKED;
     5.6      serial_force_unlock(sercon_handle);
     5.7 +    console_start_sync();
     5.8  }
     5.9  
    5.10  void console_force_lock(void)