[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH ppc-next] target-ppc: List alias names alongside CPU
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PATCH ppc-next] target-ppc: List alias names alongside CPU models |
Date: |
Sat, 23 Feb 2013 18:34:28 +0100 |
Revert adding a separate -cpu ? output section for aliases and list them
per CPU subclass.
Requested-by: Alexander Graf <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
---
target-ppc/translate_init.c | 23 +++++++++++------------
1 Datei geändert, 11 Zeilen hinzugefügt(+), 12 Zeilen entfernt(-)
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 547ba8a..9cb8daa 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -8330,6 +8330,7 @@ static void ppc_cpu_list_entry(gpointer data, gpointer
user_data)
PowerPCCPUClass *pcc = POWERPC_CPU_CLASS(oc);
const char *typename = object_class_get_name(oc);
char *name;
+ int i;
#if defined(TARGET_PPCEMB)
if (pcc->mmu_model != POWERPC_MMU_BOOKE) {
@@ -8344,6 +8345,16 @@ static void ppc_cpu_list_entry(gpointer data, gpointer
user_data)
strlen(typename) - strlen("-" TYPE_POWERPC_CPU));
(*s->cpu_fprintf)(s->file, "PowerPC %-16s PVR %08x\n",
name, pcc->pvr);
+ for (i = 0; i < ARRAY_SIZE(ppc_cpu_aliases); i++) {
+ const PowerPCCPUAlias *alias = &ppc_cpu_aliases[i];
+ ObjectClass *alias_oc = ppc_cpu_class_by_name(alias->model);
+
+ if (alias_oc != oc) {
+ continue;
+ }
+ (*s->cpu_fprintf)(s->file, "PowerPC %-16s (alias for %s)\n",
+ alias->alias, name);
+ }
g_free(name);
}
@@ -8354,7 +8365,6 @@ void ppc_cpu_list(FILE *f, fprintf_function cpu_fprintf)
.cpu_fprintf = cpu_fprintf,
};
GSList *list;
- int i;
list = object_class_get_list(TYPE_POWERPC_CPU, false);
list = g_slist_sort(list, ppc_cpu_list_compare);
@@ -8365,17 +8375,6 @@ void ppc_cpu_list(FILE *f, fprintf_function cpu_fprintf)
cpu_fprintf(f, "\n");
cpu_fprintf(f, "PowerPC %-16s\n", "host");
#endif
-
- cpu_fprintf(f, "\n");
- for (i = 0; i < ARRAY_SIZE(ppc_cpu_aliases); i++) {
- ObjectClass *oc = ppc_cpu_class_by_name(ppc_cpu_aliases[i].model);
- if (oc == NULL) {
- /* Hide aliases that point to a TODO or TODO_USER_ONLY model */
- continue;
- }
- cpu_fprintf(f, "PowerPC %-16s\n",
- ppc_cpu_aliases[i].alias);
- }
}
static void ppc_cpu_defs_entry(gpointer data, gpointer user_data)
--
1.7.10.4
- [Qemu-devel] [PATCH ppc-next] target-ppc: List alias names alongside CPU models,
Andreas Färber <=