* [Qemu-devel] [PATCH] m48t59: use rtc_clock for alarm timer
@ 2012-01-20 12:05 Paolo Bonzini
2012-01-20 12:45 ` Andreas Färber
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Paolo Bonzini @ 2012-01-20 12:05 UTC (permalink / raw)
To: qemu-devel; +Cc: Andreas Färber
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=vm".
Cc: Andreas Färber <afaerber@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/m48t59.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
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 = 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 = g_malloc0(s->size);
if (s->type == 59) {
- s->alrm_timer = qemu_new_timer_ns(vm_clock, &alarm_cb, s);
+ s->alrm_timer = qemu_new_timer_ns(rtc_clock, &alarm_cb, s);
s->wd_timer = qemu_new_timer_ns(vm_clock, &watchdog_cb, s);
}
qemu_get_timedate(&s->alarm, 0);
--
1.7.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] m48t59: use rtc_clock for alarm timer
2012-01-20 12:05 [Qemu-devel] [PATCH] m48t59: use rtc_clock for alarm timer Paolo Bonzini
@ 2012-01-20 12:45 ` Andreas Färber
2012-01-30 16:40 ` Paolo Bonzini
2012-01-30 19:29 ` Blue Swirl
2 siblings, 0 replies; 4+ messages in thread
From: Andreas Färber @ 2012-01-20 12:45 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Blue Swirl, qemu-devel
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=vm".
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Cc: Blue
Andreas
> ---
> hw/m48t59.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> 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 = 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 = g_malloc0(s->size);
> if (s->type == 59) {
> - s->alrm_timer = qemu_new_timer_ns(vm_clock, &alarm_cb, s);
> + s->alrm_timer = qemu_new_timer_ns(rtc_clock, &alarm_cb, s);
> s->wd_timer = qemu_new_timer_ns(vm_clock, &watchdog_cb, s);
> }
> qemu_get_timedate(&s->alarm, 0);
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] m48t59: use rtc_clock for alarm timer
2012-01-20 12:05 [Qemu-devel] [PATCH] m48t59: use rtc_clock for alarm timer Paolo Bonzini
2012-01-20 12:45 ` Andreas Färber
@ 2012-01-30 16:40 ` Paolo Bonzini
2012-01-30 19:29 ` Blue Swirl
2 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2012-01-30 16:40 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: qemu-devel, Andreas Färber
On 01/20/2012 01:05 PM, Paolo Bonzini wrote:
> 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=vm".
>
> Cc: Andreas Färber<afaerber@suse.de>
> Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
> ---
> hw/m48t59.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> 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 = 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 = g_malloc0(s->size);
> if (s->type == 59) {
> - s->alrm_timer = qemu_new_timer_ns(vm_clock,&alarm_cb, s);
> + s->alrm_timer = qemu_new_timer_ns(rtc_clock,&alarm_cb, s);
> s->wd_timer = qemu_new_timer_ns(vm_clock,&watchdog_cb, s);
> }
> qemu_get_timedate(&s->alarm, 0);
Ping.
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] m48t59: use rtc_clock for alarm timer
2012-01-20 12:05 [Qemu-devel] [PATCH] m48t59: use rtc_clock for alarm timer Paolo Bonzini
2012-01-20 12:45 ` Andreas Färber
2012-01-30 16:40 ` Paolo Bonzini
@ 2012-01-30 19:29 ` Blue Swirl
2 siblings, 0 replies; 4+ messages in thread
From: Blue Swirl @ 2012-01-30 19:29 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, Andreas Färber
Thanks, applied.
On Fri, Jan 20, 2012 at 12:05, Paolo Bonzini <pbonzini@redhat.com> wrote:
> 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=vm".
>
> Cc: Andreas Färber <afaerber@suse.de>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> hw/m48t59.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> 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 = 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 = g_malloc0(s->size);
> if (s->type == 59) {
> - s->alrm_timer = qemu_new_timer_ns(vm_clock, &alarm_cb, s);
> + s->alrm_timer = qemu_new_timer_ns(rtc_clock, &alarm_cb, s);
> s->wd_timer = qemu_new_timer_ns(vm_clock, &watchdog_cb, s);
> }
> qemu_get_timedate(&s->alarm, 0);
> --
> 1.7.7.1
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-01-30 19:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-20 12:05 [Qemu-devel] [PATCH] m48t59: use rtc_clock for alarm timer Paolo Bonzini
2012-01-20 12:45 ` Andreas Färber
2012-01-30 16:40 ` Paolo Bonzini
2012-01-30 19:29 ` Blue Swirl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).