diff -Npru kexec-kernel-only/arch/x86_64/kernel/machine_kexec.c kexec-kernel-only_20121203/arch/x86_64/kernel/machine_kexec.c --- kexec-kernel-only/arch/x86_64/kernel/machine_kexec.c 2012-11-07 13:09:47.000000000 +0100 +++ kexec-kernel-only_20121203/arch/x86_64/kernel/machine_kexec.c 2012-12-03 10:48:06.000000000 +0100 @@ -813,9 +813,18 @@ NORET_TYPE void xen_pv_machine_kexec(str atomic_inc(&control_page_ready); #endif +#if 0 + /* + * Disabled due to some Amazon EC2 machines are not able + * to restart timer properly in crash kernel. If this happens + * then it hangs in loop in calibrate_delay_direct() because + * jiffies are not incremented. + */ + /* Stop singleshot timer. */ if (HYPERVISOR_set_timer_op(0)) BUG(); +#endif #ifdef CONFIG_SMP for_each_present_cpu(i) diff -Npru kexec-kernel-only/init/calibrate.c kexec-kernel-only_20121203/init/calibrate.c --- kexec-kernel-only/init/calibrate.c 2012-09-17 11:56:40.000000000 +0200 +++ kexec-kernel-only_20121203/init/calibrate.c 2012-12-03 10:34:02.000000000 +0100 @@ -67,7 +67,7 @@ static unsigned long __devinit calibrate pre_start = 0; read_current_timer(&start); start_jiffies = jiffies; - while (jiffies <= (start_jiffies + tick_divider)) { + while (time_before_eq(jiffies, start_jiffies + tick_divider)) { pre_start = start; read_current_timer(&start); } @@ -75,8 +75,8 @@ static unsigned long __devinit calibrate pre_end = 0; end = post_start; - while (jiffies <= - (start_jiffies + tick_divider * (1 + delay_calibration_ticks))) { + while (time_before_eq(jiffies, + start_jiffies + tick_divider * (1 + delay_calibration_ticks))) { pre_end = end; read_current_timer(&end); }