From patchwork Fri Nov 23 15:12:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 201337 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7F6282C008E for ; Sat, 24 Nov 2012 02:13:13 +1100 (EST) Received: from localhost ([::1]:51349 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbuwJ-0006ed-JQ for incoming@patchwork.ozlabs.org; Fri, 23 Nov 2012 10:13:11 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tbuw8-0006e0-4n for qemu-devel@nongnu.org; Fri, 23 Nov 2012 10:13:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tbuw2-00040B-G7 for qemu-devel@nongnu.org; Fri, 23 Nov 2012 10:13:00 -0500 Received: from 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa ([2001:8b0:1d0::1]:53164 helo=mnementh.archaic.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tbuw2-000407-9W for qemu-devel@nongnu.org; Fri, 23 Nov 2012 10:12:54 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1Tbuvy-0007wm-Lu; Fri, 23 Nov 2012 15:12:50 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 23 Nov 2012 15:12:50 +0000 Message-Id: <1353683570-30525-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: qemu-trivial@nongnu.org, Yurij Popov , patches@linaro.org Subject: [Qemu-devel] [PATCH] qemu-timer: Don't use RDTSC on 386s and 486s X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Adjust the conditional which guards the implementation of cpu_get_real_ticks() via RDTSC, so that we don't try to use it on x86 CPUs which don't implement RDTSC. Instead we will fall back to the no-cycle-counter-available default implementation. Reported-by: Yurij Popov Signed-off-by: Peter Maydell --- qemu-timer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-timer.h b/qemu-timer.h index da7e97c..e35f163 100644 --- a/qemu-timer.h +++ b/qemu-timer.h @@ -169,7 +169,7 @@ static inline int64_t cpu_get_real_ticks(void) return retval; } -#elif defined(__i386__) +#elif defined(__i586__) static inline int64_t cpu_get_real_ticks(void) {