From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37301) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoDsL-0000Lj-78 for qemu-devel@nongnu.org; Fri, 20 Jan 2012 07:47:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RoDsD-00088J-Qo for qemu-devel@nongnu.org; Fri, 20 Jan 2012 07:47:25 -0500 Received: from cantor2.suse.de ([195.135.220.15]:40347 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoDsD-000886-Lq for qemu-devel@nongnu.org; Fri, 20 Jan 2012 07:47:17 -0500 Message-ID: <4F1961E0.1000602@suse.de> Date: Fri, 20 Jan 2012 13:45:20 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1327061100-9286-1-git-send-email-pbonzini@redhat.com> In-Reply-To: <1327061100-9286-1-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] m48t59: use rtc_clock for alarm timer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Blue Swirl , qemu-devel@nongnu.org Am 20.01.2012 13:05, schrieb Paolo Bonzini: > This lets the RTC get adjustments from the host NTP client. > The watchdog still uses the vm_clock. The previous behavior is > available with "-rtc clock=3Dvm". >=20 > Signed-off-by: Paolo Bonzini Reviewed-by: Andreas F=C3=A4rber Cc: Blue Andreas > --- > hw/m48t59.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/hw/m48t59.c b/hw/m48t59.c > index c043996..fd5dc00 100644 > --- a/hw/m48t59.c > +++ b/hw/m48t59.c > @@ -126,7 +126,7 @@ static void alarm_cb (void *opaque) > /* Repeat once a second */ > next_time =3D 1; > } > - qemu_mod_timer(NVRAM->alrm_timer, qemu_get_clock_ns(vm_clock) + > + qemu_mod_timer(NVRAM->alrm_timer, qemu_get_clock_ns(rtc_clock) + > next_time * 1000); > qemu_set_irq(NVRAM->IRQ, 0); > } > @@ -687,7 +687,7 @@ static void m48t59_init_common(M48t59State *s) > { > s->buffer =3D g_malloc0(s->size); > if (s->type =3D=3D 59) { > - s->alrm_timer =3D qemu_new_timer_ns(vm_clock, &alarm_cb, s); > + s->alrm_timer =3D qemu_new_timer_ns(rtc_clock, &alarm_cb, s); > s->wd_timer =3D qemu_new_timer_ns(vm_clock, &watchdog_cb, s); > } > qemu_get_timedate(&s->alarm, 0); --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg