diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-07-29 10:31:21 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-07-29 10:31:21 +0100 |
commit | 877ca1b20fecf14b364efe9ea0886f0be110a43f (patch) | |
tree | 3283c322156af9a2184772018e3de65fbac83460 /xen/arch/x86/machine_kexec.c | |
parent | b99b79d46b8b7c8b3d26600445e86db9db23c744 (diff) | |
download | xen-877ca1b20fecf14b364efe9ea0886f0be110a43f.tar.gz xen-877ca1b20fecf14b364efe9ea0886f0be110a43f.tar.bz2 xen-877ca1b20fecf14b364efe9ea0886f0be110a43f.zip |
kexec: Clean up shutdown logic. Reinstate ACPI DMAR during kexec.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/arch/x86/machine_kexec.c')
-rw-r--r-- | xen/arch/x86/machine_kexec.c | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/xen/arch/x86/machine_kexec.c b/xen/arch/x86/machine_kexec.c index f44aba2b5b..d3f146854f 100644 --- a/xen/arch/x86/machine_kexec.c +++ b/xen/arch/x86/machine_kexec.c @@ -18,6 +18,7 @@ #include <xen/domain_page.h> #include <asm/fixmap.h> #include <asm/hvm/hvm.h> +#include <asm/hpet.h> typedef void (*relocate_new_kernel_t)( unsigned long indirection_page, @@ -76,38 +77,11 @@ void machine_kexec_unload(int type, int slot, xen_kexec_image_t *image) { } -static void __machine_reboot_kexec(void *data) +void machine_reboot_kexec(xen_kexec_image_t *image) { - xen_kexec_image_t *image = (xen_kexec_image_t *)data; - - watchdog_disable(); - console_start_sync(); - + BUG_ON(smp_processor_id() != 0); smp_send_stop(); - machine_kexec(image); -} - -void machine_reboot_kexec(xen_kexec_image_t *image) -{ - int reboot_cpu_id; - - reboot_cpu_id = 0; - - if ( !cpu_isset(reboot_cpu_id, cpu_online_map) ) - reboot_cpu_id = smp_processor_id(); - - if ( reboot_cpu_id != smp_processor_id() ) - { - on_selected_cpus(cpumask_of(reboot_cpu_id), __machine_reboot_kexec, - image, 0); - for (;;) - ; /* nothing */ - } - else - { - __machine_reboot_kexec(image); - } BUG(); } @@ -118,6 +92,9 @@ void machine_kexec(xen_kexec_image_t *image) .limit = LAST_RESERVED_GDT_BYTE }; + if ( hpet_broadcast_is_available() ) + hpet_disable_legacy_broadcast(); + /* * compat_machine_kexec() returns to idle pagetables, which requires us * to be running on a static GDT mapping (idle pagetables have no GDT |