[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 2/3] xen: don't initialize the RTC timers if xen is available



From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

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@xxxxxxxxxxxxx>
---
 hw/mc146818rtc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c
index cb3f56b..253b680 100644
--- a/hw/mc146818rtc.c
+++ b/hw/mc146818rtc.c
@@ -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);
-- 
1.7.2.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.