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: 13161 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 6C18123FC0 for ; Fri, 23 Nov 2012 15:12:57 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 13CA1A18A36 for ; Fri, 23 Nov 2012 15:12:56 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id c10so1934920ieb.11 for ; Fri, 23 Nov 2012 07:12:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=B9aEEy5Hmc9kowxmVNcQcdkMcXA6VfXZlWEzrOCz43A=; b=hI306exvLpbDvG78wJvzgynQ2AGyVfXZJOw6fsEbS4CZU1wCwyINR0cUd5cCJi6eEv mGX7DeWFmRNHj/yeRmW5TTLNjN9s7iN9frWn8zvzoRfHeySqIf3dZECRY4z2av9ZcybW qu5CiDEam8DoVc3m+38gGV3wajzrhA2q4fsB1MlKSOIlHTtmhaj4P6gVeVd47RQnbKda sydjRI1n3vWdNjkvDwgZ2O0gzO2ThyyHcXqcAdLMrEr0CWhRj6qycNm+QJ14oIkbKE7+ XTd0jkBX0ixz1V3hOp2/H603/0BljBt+rgDl1UM4eGgugFe1GCTSg/OmxyHy2q0V7ctX Pxlg== Received: by 10.43.46.2 with SMTP id um2mr3366923icb.18.1353683576805; Fri, 23 Nov 2012 07:12:56 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp365796igt; Fri, 23 Nov 2012 07:12:56 -0800 (PST) Received: by 10.216.226.137 with SMTP id b9mr1604206weq.137.1353683575502; Fri, 23 Nov 2012 07:12:55 -0800 (PST) Received: from mnementh.archaic.org.uk (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]) by mx.google.com with ESMTPS id b47si2163265wef.2.2012.11.23.07.12.54 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 23 Nov 2012 07:12:55 -0800 (PST) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Authentication-Results: mx.google.com; spf=neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) smtp.mail=pm215@archaic.org.uk 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 Cc: patches@linaro.org, qemu-trivial@nongnu.org, Yurij Popov Subject: [PATCH] qemu-timer: Don't use RDTSC on 386s and 486s 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-Gm-Message-State: ALoCoQk7yTTBizSxeY3hJJ0gVw7lj+2K6MSxbTKuSoUWJK/9Fqdp6ejgta5r3qV9YNMsq9YrM5+Z 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) {