qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org, Paul Brook <paul@codesourcery.com>
Subject: [Qemu-devel] [PATCH 2/5] omap: switch omap_lpg to vm_clock
Date: Fri, 30 Mar 2012 11:39:10 +0100	[thread overview]
Message-ID: <1333103953-3430-3-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1333103953-3430-1-git-send-email-peter.maydell@linaro.org>

From: Paolo Bonzini <pbonzini@redhat.com>

The output of the pulse generator needs to be deterministic when
running in -icount mode, and to remain constant whenever the VM is
stopped.  So the right clock to use is vm_clock.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/omap1.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/omap1.c b/hw/omap1.c
index 2a341bf..39e731a 100644
--- a/hw/omap1.c
+++ b/hw/omap1.c
@@ -3497,9 +3497,9 @@ static void omap_lpg_tick(void *opaque)
     struct omap_lpg_s *s = opaque;
 
     if (s->cycle)
-        qemu_mod_timer(s->tm, qemu_get_clock_ms(rt_clock) + s->period - s->on);
+        qemu_mod_timer(s->tm, qemu_get_clock_ms(vm_clock) + s->period - s->on);
     else
-        qemu_mod_timer(s->tm, qemu_get_clock_ms(rt_clock) + s->on);
+        qemu_mod_timer(s->tm, qemu_get_clock_ms(vm_clock) + s->on);
 
     s->cycle = !s->cycle;
     printf("%s: LED is %s\n", __FUNCTION__, s->cycle ? "on" : "off");
@@ -3617,7 +3617,7 @@ static struct omap_lpg_s *omap_lpg_init(MemoryRegion *system_memory,
     struct omap_lpg_s *s = (struct omap_lpg_s *)
             g_malloc0(sizeof(struct omap_lpg_s));
 
-    s->tm = qemu_new_timer_ms(rt_clock, omap_lpg_tick, s);
+    s->tm = qemu_new_timer_ms(vm_clock, omap_lpg_tick, s);
 
     omap_lpg_reset(s);
 
-- 
1.7.1

  parent reply	other threads:[~2012-03-30 10:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-30 10:39 [Qemu-devel] [PULL 0/5] arm-devs queue Peter Maydell
2012-03-30 10:39 ` [Qemu-devel] [PATCH 1/5] rtc: add -rtc clock=rt Peter Maydell
2012-03-30 10:39 ` Peter Maydell [this message]
2012-03-30 10:39 ` [Qemu-devel] [PATCH 3/5] arm: switch real-time clocks to rtc_clock Peter Maydell
2012-03-30 10:39 ` [Qemu-devel] [PATCH 4/5] pl031: rearm alarm timer upon load Peter Maydell
2012-03-30 10:39 ` [Qemu-devel] [PATCH 5/5] pl031: switch clock base to rtc_clock Peter Maydell
2012-03-31 13:03 ` [Qemu-devel] [PULL 0/5] arm-devs queue Blue Swirl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1333103953-3430-3-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=anthony@codemonkey.ws \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).