[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 008/118] target-ppc: Move alias lookup after class lo
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PULL 008/118] target-ppc: Move alias lookup after class lookup |
Date: |
Wed, 4 Jun 2014 14:43:09 +0200 |
From: Alexey Kardashevskiy <address@hidden>
This moves aliases lookup after CPU class lookup. This is to let new generic
CPU to be found first if it is present and only if it is not (TCG case), use
aliases.
Signed-off-by: Alexey Kardashevskiy <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
target-ppc/translate_init.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 4d94015..823c63c 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -8218,12 +8218,6 @@ static ObjectClass *ppc_cpu_class_by_name(const char
*name)
}
}
- for (i = 0; ppc_cpu_aliases[i].alias != NULL; i++) {
- if (strcmp(ppc_cpu_aliases[i].alias, name) == 0) {
- return ppc_cpu_class_by_alias(&ppc_cpu_aliases[i]);
- }
- }
-
list = object_class_get_list(TYPE_POWERPC_CPU, false);
item = g_slist_find_custom(list, name, ppc_cpu_compare_class_name);
if (item != NULL) {
@@ -8231,7 +8225,17 @@ static ObjectClass *ppc_cpu_class_by_name(const char
*name)
}
g_slist_free(list);
- return ret;
+ if (ret) {
+ return ret;
+ }
+
+ for (i = 0; ppc_cpu_aliases[i].alias != NULL; i++) {
+ if (strcmp(ppc_cpu_aliases[i].alias, name) == 0) {
+ return ppc_cpu_class_by_alias(&ppc_cpu_aliases[i]);
+ }
+ }
+
+ return NULL;
}
PowerPCCPU *cpu_ppc_init(const char *cpu_model)
--
1.8.1.4
- [Qemu-devel] [PULL 00/118] ppc patch queue 2014-06-04, Alexander Graf, 2014/06/04
- [Qemu-devel] [PULL 003/118] Fix typo in eTSEC Ethernet controller, Alexander Graf, 2014/06/04
- [Qemu-devel] [PULL 008/118] target-ppc: Move alias lookup after class lookup,
Alexander Graf <=
- [Qemu-devel] [PULL 001/118] target-ppc: Fix target_disas, Alexander Graf, 2014/06/04
- [Qemu-devel] [PULL 002/118] monitor: QEMU Monitor Instruction Disassembly Incorrect for PowerPC LE Mode, Alexander Graf, 2014/06/04
- [Qemu-devel] [PULL 005/118] target-ppc: extract register length calculation in gdbstub, Alexander Graf, 2014/06/04
- [Qemu-devel] [PULL 009/118] target-ppc: Remove redundant POWER7 declarations, Alexander Graf, 2014/06/04
- [Qemu-devel] [PULL 010/118] spapr-pci: remove io ports workaround, Alexander Graf, 2014/06/04
- [Qemu-devel] [PULL 014/118] mac99: Added FW_CFG_PPC_BUSFREQ to match CLOCKFREQ and TBFREQ already there, Alexander Graf, 2014/06/04
- [Qemu-devel] [PULL 004/118] spapr_nvram: Correct max nvram size, Alexander Graf, 2014/06/04
- [Qemu-devel] [PULL 011/118] spapr_pci: Fix number of returned vectors in ibm, change-msi, Alexander Graf, 2014/06/04
- [Qemu-devel] [PULL 007/118] target-ppc: Create versionless CPU class per family if KVM, Alexander Graf, 2014/06/04
- [Qemu-devel] [PULL 006/118] target-ppc: gdbstub allow byte swapping for reading/writing registers, Alexander Graf, 2014/06/04