Message ID | 1472033504-23180-23-git-send-email-jgross@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/arch/x86/time.c b/arch/x86/time.c index af45e56..3658142 100644 --- a/arch/x86/time.c +++ b/arch/x86/time.c @@ -212,17 +212,20 @@ void block_domain(s_time_t until) if(monotonic_clock() < until) { HYPERVISOR_set_timer_op(until); +#ifdef CONFIG_PARAVIRT HYPERVISOR_sched_op(SCHEDOP_block, 0); +#else + local_irq_enable(); + asm volatile ( "hlt" : : : "memory" ); +#endif local_irq_disable(); + HYPERVISOR_set_timer_op(0); } } - -/* - * Just a dummy - */ static void timer_handler(evtchn_port_t ev, struct pt_regs *regs, void *ign) { + HYPERVISOR_set_timer_op(monotonic_clock() + MILLISECS(1)); }