summaryrefslogtreecommitdiffstats
path: root/target-arm
diff options
context:
space:
mode:
authorMarkus Armbruster2015-06-02 15:56:22 +0200
committerPeter Maydell2015-06-02 15:56:25 +0200
commit57b6d95eb480d66c5bfa4e416d1fbcad0f84fdd2 (patch)
treed9803e517b7231f7daf1acfa94de205ba13201f2 /target-arm
parenttarget-arm: Add TLBI_VAE2{IS} (diff)
downloadqemu-57b6d95eb480d66c5bfa4e416d1fbcad0f84fdd2.tar.gz
qemu-57b6d95eb480d66c5bfa4e416d1fbcad0f84fdd2.tar.xz
qemu-57b6d95eb480d66c5bfa4e416d1fbcad0f84fdd2.zip
Revert "target-arm: Avoid g_hash_table_get_keys()"
Since we now require GLib 2.22+ (commit f40685c), we don't have to work around lack of g_hash_table_get_keys() anymore. This reverts commit 82a3a11897308b606120f7235001e87809708f85. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-id: 1432749090-4698-1-git-send-email-armbru@redhat.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-arm')
-rw-r--r--target-arm/helper.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/target-arm/helper.c b/target-arm/helper.c
index 7214d99b39..0cf446e050 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -294,23 +294,15 @@ static gint cpreg_key_compare(gconstpointer a, gconstpointer b)
return 0;
}
-static void cpreg_make_keylist(gpointer key, gpointer value, gpointer udata)
-{
- GList **plist = udata;
-
- *plist = g_list_prepend(*plist, key);
-}
-
void init_cpreg_list(ARMCPU *cpu)
{
/* Initialise the cpreg_tuples[] array based on the cp_regs hash.
* Note that we require cpreg_tuples[] to be sorted by key ID.
*/
- GList *keys = NULL;
+ GList *keys;
int arraylen;
- g_hash_table_foreach(cpu->cp_regs, cpreg_make_keylist, &keys);
-
+ keys = g_hash_table_get_keys(cpu->cp_regs);
keys = g_list_sort(keys, cpreg_key_compare);
cpu->cpreg_array_len = 0;