]> xenbits.xensource.com Git - qemu-xen-4.4-testing.git/commitdiff
xen: don't initialize the RTC timers if xen is available
authorSefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 1 Dec 2011 17:52:01 +0000 (17:52 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 1 Dec 2011 17:52:01 +0000 (17:52 +0000)
Xen doesn't need full RTC emulation in Qemu because the RTC is already
emulated by the hypervisor. Hence don't initialize the RTC timers when Xen is
available so that Qemu doesn't need to wake up needlessly.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/mc146818rtc.c

index cb3f56beab27ec7c4b13f9cf4ed44adda5e4bc4d..253b680cf6bd3264792b89437d00ce6c4dad9e64 100644 (file)
@@ -542,6 +542,7 @@ RTCState *rtc_init(int base, qemu_irq irq, int base_year)
     s->base_year = base_year;
     rtc_set_date_from_host(s);
 
+#ifndef CONFIG_DM
     s->periodic_timer = qemu_new_timer(vm_clock,
                                        rtc_periodic_timer, s);
     s->second_timer = qemu_new_timer(vm_clock,
@@ -551,6 +552,7 @@ RTCState *rtc_init(int base, qemu_irq irq, int base_year)
 
     s->next_second_time = qemu_get_clock(vm_clock) + (ticks_per_sec * 99) / 100;
     qemu_mod_timer(s->second_timer2, s->next_second_time);
+#endif
 
     register_ioport_write(base, 2, 1, cmos_ioport_write, s);
     register_ioport_read(base, 2, 1, cmos_ioport_read, s);