aboutsummaryrefslogtreecommitdiff
path: root/target/ppc/cpu-models.h
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2017-08-30 15:24:34 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2017-09-08 09:30:55 +1000
commit2527cb9109f5bac0a6c3260927923a6c06c0fe11 (patch)
treee03b0fea59f42a084d68c69151dcba1c022927a8 /target/ppc/cpu-models.h
parentb376db777563ec6f9fd57255506418b500151a3d (diff)
ppc: drop caching ObjectClass from PowerPCCPUAlias
Caching there practically doesn't give any benefits and that at slow path druring querying supported CPU list. But it introduces non conventional path of where from comes used CPU type name (kvm_ppc_register_host_cpu_type). Taking in account that kvm_ppc_register_host_cpu_type() fixes up models the aliases point to, it's sufficient to make ppc_cpu_class_by_name() translate cpu alias to correct cpu type name. So drop PowerPCCPUAlias::oc field + ppc_cpu_class_by_alias() and let ppc_cpu_class_by_name() do conversion to cpu type name, which simplifies code a little bit saving ~20LOC and trouble wondering why ppc_cpu_class_by_alias() is necessary. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target/ppc/cpu-models.h')
-rw-r--r--target/ppc/cpu-models.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/target/ppc/cpu-models.h b/target/ppc/cpu-models.h
index 629f112337..df31d7f492 100644
--- a/target/ppc/cpu-models.h
+++ b/target/ppc/cpu-models.h
@@ -31,7 +31,6 @@
typedef struct PowerPCCPUAlias {
const char *alias;
const char *model;
- ObjectClass *oc;
} PowerPCCPUAlias;
extern PowerPCCPUAlias ppc_cpu_aliases[];