[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 24/34] ppc: move ppc_cpu_lookup_alias() before its fi
From: |
David Gibson |
Subject: |
[Qemu-devel] [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-devel] [PULL 03/34] target/ppc: Remove unused PPC 460 and 460F definitions, (continued)
- [Qemu-devel] [PULL 03/34] target/ppc: Remove unused PPC 460 and 460F definitions, David Gibson, 2017/10/17
- [Qemu-devel] [PULL 04/34] spapr: fix OF word name in comment, David Gibson, 2017/10/17
- [Qemu-devel] [PULL 05/34] spapr: sanity check size of the CAS buffer, David Gibson, 2017/10/17
- [Qemu-devel] [PULL 14/34] ppc: bamboo: use generic cpu_model parsing, David Gibson, 2017/10/17
- [Qemu-devel] [PULL 12/34] ppc: mac_newworld: use generic cpu_model parsing, David Gibson, 2017/10/17
- [Qemu-devel] [PULL 13/34] ppc: mac_oldworld: use generic cpu_model parsing, David Gibson, 2017/10/17
- [Qemu-devel] [PULL 11/34] ppc: mpc8544ds/e500plat: use generic cpu_model parsing, David Gibson, 2017/10/17
- [Qemu-devel] [PULL 16/34] ppc: virtex-ml507: replace cpu_model with cpu_type, David Gibson, 2017/10/17
- [Qemu-devel] [PULL 09/34] qom: introduce type_register_static_array(), David Gibson, 2017/10/17
- [Qemu-devel] [PULL 22/34] ppc: spapr: register 'host' core type along with the rest of core types, David Gibson, 2017/10/17
- [Qemu-devel] [PULL 24/34] ppc: move ppc_cpu_lookup_alias() before its first user,
David Gibson <=
- [Qemu-devel] [PULL 07/34] target/ppc: Fix carry flag setting for shift algebraic instructions, David Gibson, 2017/10/17
- [Qemu-devel] [PULL 10/34] qom: add helper macro DEFINE_TYPES(), David Gibson, 2017/10/17
- [Qemu-devel] [PULL 15/34] ppc: replace cpu_model with cpu_type on ref405ep, taihu boards, David Gibson, 2017/10/17
- [Qemu-devel] [PULL 23/34] ppc: spapr: use cpu model names as tcg defaults instead of aliases, David Gibson, 2017/10/17
- [Qemu-devel] [PULL 08/34] hw/ppc/spapr.c: abort unplug_request if previous unplug isn't done, David Gibson, 2017/10/17
- [Qemu-devel] [PULL 06/34] target/ppc: Add POWER9 DD2.0 model information, David Gibson, 2017/10/17
- [Qemu-devel] [PULL 34/34] spapr_cpu_core: rewrite machine type sanity check, David Gibson, 2017/10/17
- [Qemu-devel] [PULL 18/34] ppc: spapr: replace ppc_cpu_parse_features() with cpu_parse_cpu_model(), David Gibson, 2017/10/17
- [Qemu-devel] [PULL 20/34] ppc: spapr: define core types statically, David Gibson, 2017/10/17
- [Qemu-devel] [PULL 28/34] ppc: pnv: drop PnvCoreClass::cpu_oc field, David Gibson, 2017/10/17