From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xtd9i-00051N-0k for qemu-devel@nongnu.org; Wed, 26 Nov 2014 09:01:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xtd9c-0004gu-23 for qemu-devel@nongnu.org; Wed, 26 Nov 2014 09:01:17 -0500 Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 26 Nov 2014 15:01:01 +0100 Message-Id: <1417010463-3527-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH] ppc: do not use get_clock_realtime() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org Use the external qemu-timer API instead. Cc: qemu-ppc@nongnu.org Signed-off-by: Paolo Bonzini --- hw/ppc/ppc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c index bec82cd..5ce565d 100644 --- a/hw/ppc/ppc.c +++ b/hw/ppc/ppc.c @@ -844,7 +844,7 @@ static void timebase_pre_save(void *opaque) return; } - tb->time_of_the_day_ns = get_clock_realtime(); + tb->time_of_the_day_ns = qemu_clock_get_ns(QEMU_CLOCK_HOST); /* * tb_offset is only expected to be changed by migration so * there is no need to update it from KVM here @@ -873,7 +873,7 @@ static int timebase_post_load(void *opaque, int version_id) * We try to adjust timebase by downtime if host clocks are not * too much out of sync (1 second for now). */ - host_ns = get_clock_realtime(); + host_ns = qemu_clock_get_ns(QEMU_CLOCK_HOST); ns_diff = MAX(0, host_ns - tb_remote->time_of_the_day_ns); migration_duration_ns = MIN(NSEC_PER_SEC, ns_diff); migration_duration_tb = muldiv64(migration_duration_ns, freq, NSEC_PER_SEC); -- 1.8.3.1