From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: "Andreas Färber" <afaerber@suse.de>,
anthony@codemonkey.ws, "Richard Henderson" <rth@twiddle.net>
Subject: [Qemu-devel] [PATCH 11/11] target-alpha: Make cpu_alpha_init() reentrant
Date: Fri, 21 Sep 2012 16:38:35 +0200 [thread overview]
Message-ID: <1348238315-29748-12-git-send-email-afaerber@suse.de> (raw)
In-Reply-To: <1348238315-29748-1-git-send-email-afaerber@suse.de>
From: Richard Henderson <rth@twiddle.net>
Guard against duplicate TCG initialization, triggered by linux-user
NPTL emulation.
Signed-off-by: Richard Henderson <rth@twiddle.net>
[AF: Split off into separate patch]
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
target-alpha/translate.c | 6 +++++-
1 Datei geändert, 5 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)
diff --git a/target-alpha/translate.c b/target-alpha/translate.c
index 93063fb..f998f75 100644
--- a/target-alpha/translate.c
+++ b/target-alpha/translate.c
@@ -3525,6 +3525,7 @@ static const struct cpu_def_t cpu_defs[] = {
CPUAlphaState * cpu_alpha_init (const char *cpu_model)
{
+ static bool inited;
AlphaCPU *cpu;
CPUAlphaState *env;
int implver, amask, i, max;
@@ -3532,7 +3533,10 @@ CPUAlphaState * cpu_alpha_init (const char *cpu_model)
cpu = ALPHA_CPU(object_new(TYPE_ALPHA_CPU));
env = &cpu->env;
- alpha_translate_init();
+ if (!inited) {
+ inited = true;
+ alpha_translate_init();
+ }
/* Default to ev67; no reason not to emulate insns by default. */
implver = IMPLVER_21264;
--
1.7.10.4
next prev parent reply other threads:[~2012-09-21 14:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-21 14:38 [Qemu-devel] [PULL] QOM CPUState patch queue 2012-09-21 Andreas Färber
2012-09-21 14:38 ` [Qemu-devel] [PATCH 01/11] MAINTAINERS: Add entry for QOM CPU Andreas Färber
2012-09-21 14:38 ` [Qemu-devel] [PATCH 02/11] target-i386: Fold -cpu ?cpuid, ?model output into -cpu help, drop ?dump Andreas Färber
2012-09-21 14:38 ` [Qemu-devel] [PATCH 03/11] Drop cpu_list_id macro Andreas Färber
2012-09-21 14:38 ` [Qemu-devel] [PATCH 04/11] target-i386: Add missing CPUID_* constants Andreas Färber
2012-09-21 14:38 ` [Qemu-devel] [PATCH 05/11] target-i386: Move CPU models from cpus-x86_64.conf to C Andreas Färber
2012-09-21 14:38 ` [Qemu-devel] [PATCH 06/11] Eliminate cpus-x86_64.conf file Andreas Färber
2012-09-21 14:38 ` [Qemu-devel] [PATCH 07/11] target-i386: x86_cpudef_setup() coding style change Andreas Färber
2012-09-21 14:38 ` [Qemu-devel] [PATCH 08/11] target-i386: Kill cpudef config section support Andreas Färber
2012-09-21 14:38 ` [Qemu-devel] [PATCH 09/11] target-i386: Drop unused setscalar() macro Andreas Färber
2012-09-21 14:38 ` [Qemu-devel] [PATCH 10/11] target-alpha: Initialize env->cpu_model_str Andreas Färber
2012-09-21 14:38 ` Andreas Färber [this message]
2012-09-21 15:19 ` [Qemu-devel] [PATCH 11/11] target-alpha: Make cpu_alpha_init() reentrant Richard Henderson
2012-09-21 15:29 ` Andreas Färber
2012-09-21 15:17 ` [Qemu-devel] [PULL] QOM CPUState patch queue 2012-09-21 Anthony Liguori
2012-09-21 16:00 ` Andreas Färber
2012-09-25 23:27 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1348238315-29748-12-git-send-email-afaerber@suse.de \
--to=afaerber@suse.de \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).