[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 24/34] ppc: move ppc_cpu_lookup_alias() before its firs
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 24/34] ppc: move ppc_cpu_lookup_alias() before its first user |
Date: |
Tue, 17 Oct 2017 15:21:42 +1100 |
From: Igor Mammedov <address@hidden>
next commit will drop ppc_cpu_lookup_alias() declaration from header
and make it static which will break its last user ppc_cpu_class_by_name()
since ppc_cpu_class_by_name() defined before ppc_cpu_lookup_alias().
To avoid this move ppc_cpu_lookup_alias() right before
ppc_cpu_class_by_name().
Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
target/ppc/translate_init.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c
index 3d16481ca1..17ac95b732 100644
--- a/target/ppc/translate_init.c
+++ b/target/ppc/translate_init.c
@@ -10060,6 +10060,19 @@ PowerPCCPUClass *ppc_cpu_class_by_pvr_mask(uint32_t
pvr)
return pcc;
}
+const char *ppc_cpu_lookup_alias(const char *alias)
+{
+ int ai;
+
+ for (ai = 0; ppc_cpu_aliases[ai].alias != NULL; ai++) {
+ if (strcmp(ppc_cpu_aliases[ai].alias, alias) == 0) {
+ return ppc_cpu_aliases[ai].model;
+ }
+ }
+
+ return NULL;
+}
+
static ObjectClass *ppc_cpu_class_by_name(const char *name)
{
char *cpu_model, *typename;
@@ -10152,19 +10165,6 @@ static void ppc_cpu_parse_featurestr(const char *type,
char *features,
pcc->parent_parse_features(type, features, errp);
}
-const char *ppc_cpu_lookup_alias(const char *alias)
-{
- int ai;
-
- for (ai = 0; ppc_cpu_aliases[ai].alias != NULL; ai++) {
- if (strcmp(ppc_cpu_aliases[ai].alias, alias) == 0) {
- return ppc_cpu_aliases[ai].model;
- }
- }
-
- return NULL;
-}
-
PowerPCCPUClass *ppc_cpu_get_family_class(PowerPCCPUClass *pcc)
{
ObjectClass *oc = OBJECT_CLASS(pcc);
--
2.13.6
- [Qemu-ppc] [PULL 16/34] ppc: virtex-ml507: replace cpu_model with cpu_type, (continued)
- [Qemu-ppc] [PULL 16/34] ppc: virtex-ml507: replace cpu_model with cpu_type, David Gibson, 2017/10/17
- [Qemu-ppc] [PULL 18/34] ppc: spapr: replace ppc_cpu_parse_features() with cpu_parse_cpu_model(), David Gibson, 2017/10/17
- [Qemu-ppc] [PULL 08/34] hw/ppc/spapr.c: abort unplug_request if previous unplug isn't done, David Gibson, 2017/10/17
- [Qemu-ppc] [PULL 19/34] ppc: move '-cpu foo, compat=xxx' parsing into ppc_cpu_parse_featurestr(), David Gibson, 2017/10/17
- [Qemu-ppc] [PULL 33/34] spapr_pci: fail gracefully with non-pseries machine types, David Gibson, 2017/10/17
- [Qemu-ppc] [PULL 14/34] ppc: bamboo: use generic cpu_model parsing, David Gibson, 2017/10/17
- [Qemu-ppc] [PULL 31/34] ppc: pnv: consolidate type definitions and batch register them, David Gibson, 2017/10/17
- [Qemu-ppc] [PULL 07/34] target/ppc: Fix carry flag setting for shift algebraic instructions, David Gibson, 2017/10/17
- [Qemu-ppc] [PULL 15/34] ppc: replace cpu_model with cpu_type on ref405ep, taihu boards, David Gibson, 2017/10/17
- [Qemu-ppc] [PULL 11/34] ppc: mpc8544ds/e500plat: use generic cpu_model parsing, David Gibson, 2017/10/17
- [Qemu-ppc] [PULL 24/34] ppc: move ppc_cpu_lookup_alias() before its first user,
David Gibson <=
- [Qemu-ppc] [PULL 23/34] ppc: spapr: use cpu model names as tcg defaults instead of aliases, David Gibson, 2017/10/17
- [Qemu-ppc] [PULL 34/34] spapr_cpu_core: rewrite machine type sanity check, David Gibson, 2017/10/17
- [Qemu-ppc] [PULL 28/34] ppc: pnv: drop PnvCoreClass::cpu_oc field, David Gibson, 2017/10/17
- [Qemu-ppc] [PULL 29/34] ppc: pnv: define core types statically, David Gibson, 2017/10/17
- [Qemu-ppc] [PULL 21/34] ppc: spapr: use cpu type name directly, David Gibson, 2017/10/17
- [Qemu-ppc] [PULL 20/34] ppc: spapr: define core types statically, David Gibson, 2017/10/17
- [Qemu-ppc] [PULL 17/34] ppc: 40p/prep: replace cpu_model with cpu_type, David Gibson, 2017/10/17
- [Qemu-ppc] [PULL 30/34] ppc: pnv: drop PnvChipClass::cpu_model field, David Gibson, 2017/10/17
- [Qemu-ppc] [PULL 32/34] spapr: Correct RAM size calculation for HPT resizing, David Gibson, 2017/10/17
- [Qemu-ppc] [PULL 26/34] ppc: pnv: use generic cpu_model parsing, David Gibson, 2017/10/17