[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86: Use halt() macro instead of direct HLT asm.
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Date 1189506104 -3600 # Node ID a657ebf8e4184a1dd1ec242cf30c53f1a1793a59 # Parent 2635119a1766068b2ab8d2b2d402ce84dcdfcacb x86: Use halt() macro instead of direct HLT asm. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> --- xen/arch/x86/crash.c | 2 +- xen/arch/x86/setup.c | 2 +- xen/arch/x86/shutdown.c | 9 +++++---- xen/arch/x86/smp.c | 4 +++- 4 files changed, 10 insertions(+), 7 deletions(-) diff -r 2635119a1766 -r a657ebf8e418 xen/arch/x86/crash.c --- a/xen/arch/x86/crash.c Tue Sep 11 08:34:04 2007 +0100 +++ b/xen/arch/x86/crash.c Tue Sep 11 11:21:44 2007 +0100 @@ -46,7 +46,7 @@ static int crash_nmi_callback(struct cpu hvm_cpu_down(); for ( ; ; ) - __asm__ __volatile__ ( "hlt" ); + halt(); return 1; } diff -r 2635119a1766 -r a657ebf8e418 xen/arch/x86/setup.c --- a/xen/arch/x86/setup.c Tue Sep 11 08:34:04 2007 +0100 +++ b/xen/arch/x86/setup.c Tue Sep 11 11:21:44 2007 +0100 @@ -168,7 +168,7 @@ static void __init do_initcalls(void) #define EARLY_FAIL(f, a...) do { \ printk( f , ## a ); \ - for ( ; ; ) __asm__ __volatile__ ( "hlt" ); \ + for ( ; ; ) halt(); \ } while (0) static unsigned long __initdata initial_images_start, initial_images_end; diff -r 2635119a1766 -r a657ebf8e418 xen/arch/x86/shutdown.c --- a/xen/arch/x86/shutdown.c Tue Sep 11 08:34:04 2007 +0100 +++ b/xen/arch/x86/shutdown.c Tue Sep 11 11:21:44 2007 +0100 @@ -38,10 +38,11 @@ static inline void kb_wait(void) break; } -static void __attribute__((noreturn)) __machine_halt(void *unused) -{ +static void __attribute__((noreturn)) __machine_halt(void *unused) +{ + local_irq_disable(); for ( ; ; ) - __asm__ __volatile__ ( "hlt" ); + halt(); } void machine_halt(void) @@ -213,7 +214,7 @@ void machine_restart(void) on_selected_cpus(cpumask_of_cpu(0), (void *)machine_restart, NULL, 1, 0); for ( ; ; ) - safe_halt(); + halt(); } smp_send_stop(); diff -r 2635119a1766 -r a657ebf8e418 xen/arch/x86/smp.c --- a/xen/arch/x86/smp.c Tue Sep 11 08:34:04 2007 +0100 +++ b/xen/arch/x86/smp.c Tue Sep 11 11:21:44 2007 +0100 @@ -319,13 +319,15 @@ int on_selected_cpus( static void stop_this_cpu (void *dummy) { + ASSERT(!local_irq_is_enabled()); + disable_local_APIC(); hvm_cpu_down(); cpu_clear(smp_processor_id(), cpu_online_map); for ( ; ; ) - __asm__ __volatile__ ( "hlt" ); + halt(); } /* _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |