From nobody Thu Dec 18 13:17:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1497364453516728.6367983320546; Tue, 13 Jun 2017 07:34:13 -0700 (PDT) Received: from localhost ([::1]:43616 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dKmtV-0000pN-4j for importer@patchew.org; Tue, 13 Jun 2017 10:34:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33258) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dKmTg-0005Mh-PE for qemu-devel@nongnu.org; Tue, 13 Jun 2017 10:07:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dKmTa-0006hR-SJ for qemu-devel@nongnu.org; Tue, 13 Jun 2017 10:07:28 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:37258) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dKmTa-0006fN-Cq for qemu-devel@nongnu.org; Tue, 13 Jun 2017 10:07:22 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.84_2) (envelope-from ) id 1dKmTS-000144-L5 for qemu-devel@nongnu.org; Tue, 13 Jun 2017 15:07:14 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 13 Jun 2017 15:06:59 +0100 Message-Id: <1497362826-21125-11-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497362826-21125-1-git-send-email-peter.maydell@linaro.org> References: <1497362826-21125-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PULL 10/17] timer.h: Provide better monotonic time X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Pranith Kumar Tested and confirmed that the stretch i386 debian qcow2 image on a raspberry pi 2 works. Fixes: LP#: 893208 Signed-off-by: Pranith Kumar Reviewed-by: Paolo Bonzini Message-id: 20170418191817.10430-1-bobby.prani@gmail.com Signed-off-by: Peter Maydell --- include/qemu/timer.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/qemu/timer.h b/include/qemu/timer.h index 8a1eb74..1b518bc 100644 --- a/include/qemu/timer.h +++ b/include/qemu/timer.h @@ -1020,10 +1020,9 @@ static inline int64_t cpu_get_host_ticks(void) /* The host CPU doesn't have an easily accessible cycle counter. Just return a monotonically increasing value. This will be totally wrong, but hopefully better than nothing. */ -static inline int64_t cpu_get_host_ticks (void) +static inline int64_t cpu_get_host_ticks(void) { - static int64_t ticks =3D 0; - return ticks++; + return get_clock(); } #endif =20 --=20 2.7.4