aboutsummaryrefslogtreecommitdiff
path: root/tcg
diff options
context:
space:
mode:
authorEmilio G. Cota <cota@braap.org>2020-06-12 20:02:28 +0100
committerAlex Bennée <alex.bennee@linaro.org>2020-06-16 14:49:05 +0100
commit938e897a6615b63093881e8b58206f6f69212abe (patch)
tree90ca99f486a375dc3eeea074bcbbfdbdc77c4bd2 /tcg
parent5107a47bb2bf3a7492db5f86cf02302f170a0bf0 (diff)
tcg: call qemu_spin_destroy for tb->jmp_lock
Signed-off-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Robert Foley <robert.foley@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> [RF: minor changes + remove tb_destroy_func] Message-Id: <20200609200738.445-7-robert.foley@linaro.org> Message-Id: <20200612190237.30436-10-alex.bennee@linaro.org>
Diffstat (limited to 'tcg')
-rw-r--r--tcg/tcg.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 1aa6cb47f2..1362bc6101 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -502,6 +502,14 @@ size_t tcg_nb_tbs(void)
return nb_tbs;
}
+static gboolean tcg_region_tree_traverse(gpointer k, gpointer v, gpointer data)
+{
+ TranslationBlock *tb = v;
+
+ tb_destroy(tb);
+ return FALSE;
+}
+
static void tcg_region_tree_reset_all(void)
{
size_t i;
@@ -510,6 +518,7 @@ static void tcg_region_tree_reset_all(void)
for (i = 0; i < region.n; i++) {
struct tcg_region_tree *rt = region_trees + i * tree_size;
+ g_tree_foreach(rt->tree, tcg_region_tree_traverse, NULL);
/* Increment the refcount first so that destroy acts as a reset */
g_tree_ref(rt->tree);
g_tree_destroy(rt->tree);