[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 10/22] Revert "target-arm: Avoid g_hash_table_get_key
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 10/22] Revert "target-arm: Avoid g_hash_table_get_keys()" |
Date: |
Tue, 2 Jun 2015 17:33:40 +0100 |
From: Markus Armbruster <address@hidden>
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 <address@hidden>
Message-id: address@hidden
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
---
target-arm/helper.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/target-arm/helper.c b/target-arm/helper.c
index 7214d99..0cf446e 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;
--
1.9.1
- [Qemu-devel] [PULL 13/22] target-arm: Extend the gic node properties, (continued)
- [Qemu-devel] [PULL 13/22] target-arm: Extend the gic node properties, Peter Maydell, 2015/06/02
- [Qemu-devel] [PULL 14/22] target-arm: Add the GICv2m to the virt board, Peter Maydell, 2015/06/02
- [Qemu-devel] [PULL 09/22] target-arm: Add TLBI_VAE2{IS}, Peter Maydell, 2015/06/02
- [Qemu-devel] [PULL 11/22] target-arm: Add GIC phandle to VirtBoardInfo, Peter Maydell, 2015/06/02
- [Qemu-devel] [PULL 08/22] target-arm: Add TLBI_ALLE2, Peter Maydell, 2015/06/02
- [Qemu-devel] [PULL 06/22] target-arm: Add TTBR0_EL2, Peter Maydell, 2015/06/02
- [Qemu-devel] [PULL 05/22] target-arm: Add TPIDR_EL2, Peter Maydell, 2015/06/02
- [Qemu-devel] [PULL 12/22] arm_gicv2m: Add GICv2m widget to support MSIs, Peter Maydell, 2015/06/02
- [Qemu-devel] [PULL 04/22] target-arm: Add SCTLR_EL2, Peter Maydell, 2015/06/02
- [Qemu-devel] [PULL 02/22] target-arm: Add MAIR_EL2, Peter Maydell, 2015/06/02
- [Qemu-devel] [PULL 10/22] Revert "target-arm: Avoid g_hash_table_get_keys()",
Peter Maydell <=
- [Qemu-devel] [PULL 03/22] target-arm: Add TCR_EL2, Peter Maydell, 2015/06/02
- [Qemu-devel] [PULL 18/22] target-arm: Remove v8_ prefix from names of non-v8-specific cpreg arrays, Peter Maydell, 2015/06/02
- [Qemu-devel] [PULL 07/22] target-arm: Add TLBI_ALLE1{IS}, Peter Maydell, 2015/06/02
- Re: [Qemu-devel] [PULL 00/22] target-arm queue, Peter Maydell, 2015/06/04