From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43175) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RU0TC-0007By-Kq for qemu-devel@nongnu.org; Fri, 25 Nov 2011 13:25:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RU0TB-0000GW-Hg for qemu-devel@nongnu.org; Fri, 25 Nov 2011 13:25:54 -0500 Received: from mnementh.archaic.org.uk ([81.2.115.146]:51742) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RU0TB-0000GD-BV for qemu-devel@nongnu.org; Fri, 25 Nov 2011 13:25:53 -0500 From: Peter Maydell Date: Fri, 25 Nov 2011 18:25:50 +0000 Message-Id: <1322245550-5110-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH] target-arm/helper.c: Don't allocate TCG resources unless TCG enabled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: patches@linaro.org 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(); } -- 1.7.1