From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: laurent@vivier.eu
Subject: Re: [Qemu-devel] [PATCH] m68k: Build the opcode table only once to avoid multithreading issues
Date: Wed, 3 Feb 2016 16:20:44 +0100 [thread overview]
Message-ID: <56B21ACC.1020802@physik.fu-berlin.de> (raw)
In-Reply-To: <56B219E4.2070800@redhat.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 02/03/2016 04:16 PM, Eric Blake wrote:
> Missing {}. Are you sure this is the version that passed
> checkpatch.pl?
Yes:
glaubitz@z6:..qemu/target-m68k> ../scripts/checkpatch.pl
0002-m68k-Build-the-opcode-table-only-once-to-avoid-multi.patch
total: 0 errors, 0 warnings, 10 lines checked
0002-m68k-Build-the-opcode-table-only-once-to-avoid-multi.patch has no
obvious style problems and is ready for submission.
glaubitz@z6:..qemu/target-m68k> cat
0002-m68k-Build-the-opcode-table-only-once-to-avoid-multi.patch
- From 2d8ef8d0244db95e41e04ff909560f12676e1dec Mon Sep 17 00:00:00 2001
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date: Wed, 3 Feb 2016 10:22:35 +0100
Subject: [PATCH 2/2] m68k: Build the opcode table only once to avoid
multithreading issues
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
- ---
target-m68k/translate.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index 535d7f9..a989961 100644
- --- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -2828,6 +2828,10 @@ register_opcode (disas_proc proc, uint16_t
opcode, uint16_t mask)
Later insn override earlier ones. */
void register_m68k_insns (CPUM68KState *env)
{
+ /* Build the opcode table only once to avoid
+ multithreading issues. */
+ if (opcode_table[0] != NULL)
+ return;
#define INSN(name, opcode, mask, feature) do { \
if (m68k_feature(env, M68K_FEATURE_##feature)) \
register_opcode(disas_##name, 0x##opcode, 0x##mask); \
- --
2.7.0
glaubitz@z6:..qemu/target-m68k>
- --
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz@debian.org
`. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJWshrHAAoJEHQmOzf1tfkT9V0P/1cMCHys6vImaJZtGOzQyaf2
PgsAw0fpgaOuL6u8ypxVHo++7QRI4lbZMTBx5PPuZQsc1iRhN27bAcxIzsoDPDeg
KVHx5Jc7JcvDNQiCTArOW1FVQeFFVYkQlAoTWzOqr+DYje8flU3OmKzbVoU+MXTN
Vv7P5CQk90mSxYMLzaggM+BpPMtVGvhxuVy0wOQKnMgTyF0U0r/G+/PmUBcidwDv
w7v7EcUSzzEXp6vZR6W0qBP6QBRqJyG3lrxWjZBl1K9lWfEv4gd4IQxWbf/A6P22
3GQjtEiiIEgppP1YFl0ah0VY/7uEtsx5sxo5vEOiWgaRm1Th8Y3rctFEyfT8Y73K
da1ro7KLFqRSut2tzuQ+ebsTujLY+XTs0y5Sxg3K8LfuMIs6fjzPN0hpx+8Z0hjD
7wqXoINLxIuCPz66cLkVFdtJTl7Z2uXGwGplel7wGTgLaIJHY8ZlOowmwELivVTh
ZhoVM3vaF3bHAx5g5CgsJ3X9EaJoxu268hJoMLwaOVte8lgOr48acGZPWPrMwdHp
hi9lJtnKzfMN09WFmYWiAeB0sx6TpniK48o2URwLX+UVMnkQz2qIEjFeAfmz//IR
vRQtLGqZg1Cjw76TpIPVd7hJPeklZXqt1rd4NoWn3CML0xIlWOYGSBNi7CTboPyr
MyBXXeWItvj6kwO4pm7f
=L8Yn
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2016-02-03 15:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-03 10:14 [Qemu-devel] Updated patch for the opcode table John Paul Adrian Glaubitz
2016-02-03 10:14 ` [Qemu-devel] [PATCH] m68k: Build the opcode table only once to avoid multithreading issues John Paul Adrian Glaubitz
2016-02-03 15:16 ` Eric Blake
2016-02-03 15:19 ` Laurent Vivier
2016-02-03 15:20 ` John Paul Adrian Glaubitz [this message]
2016-02-03 16:11 ` Eric Blake
2016-02-04 15:18 ` John Paul Adrian Glaubitz
2016-02-08 23:15 ` John Paul Adrian Glaubitz
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=56B21ACC.1020802@physik.fu-berlin.de \
--to=glaubitz@physik.fu-berlin.de \
--cc=eblake@redhat.com \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.