From patchwork Fri Nov 25 18:25:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 5319 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 0DDE523E0E for ; Fri, 25 Nov 2011 18:26:00 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id E4D6DA1859B for ; Fri, 25 Nov 2011 18:25:59 +0000 (UTC) Received: by faaa26 with SMTP id a26so4808357faa.11 for ; Fri, 25 Nov 2011 10:25:59 -0800 (PST) Received: by 10.152.105.226 with SMTP id gp2mr21103124lab.28.1322245559689; Fri, 25 Nov 2011 10:25:59 -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.152.41.198 with SMTP id h6cs350434lal; Fri, 25 Nov 2011 10:25:57 -0800 (PST) Received: by 10.216.30.209 with SMTP id k59mr89798wea.11.1322245554367; Fri, 25 Nov 2011 10:25:54 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id fj5si12590306wbb.128.2011.11.25.10.25.52 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 25 Nov 2011 10:25:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1RU0T8-0001Kr-Lj; Fri, 25 Nov 2011 18:25:50 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org Subject: [PATCH] target-arm/helper.c: Don't allocate TCG resources unless TCG enabled Date: Fri, 25 Nov 2011 18:25:50 +0000 Message-Id: <1322245550-5110-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 Don't call arm_translate_init() (which allocates TCG resources) unless TCG is enabled. Signed-off-by: Peter Maydell --- First KVM related QEMU patch :-) [without this we segfault on startup if run with -enable-kvm, although the omission is currently harmless for upstream QEMU where TCG is always enabled on ARM.] target-arm/helper.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 97af4d0..3fe5822 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -390,7 +390,7 @@ CPUARMState *cpu_arm_init(const char *cpu_model) return NULL; env = g_malloc0(sizeof(CPUARMState)); cpu_exec_init(env); - if (!inited) { + if (tcg_enabled() && !inited) { inited = 1; arm_translate_init(); }