summaryrefslogtreecommitdiffstats
path: root/target/ppc/kvm.c
diff options
context:
space:
mode:
authorIgor Mammedov2017-08-30 15:24:29 +0200
committerDavid Gibson2017-09-08 01:30:55 +0200
commitc9137065814609111ec0ed29246388f4ad086732 (patch)
treee97ebfb1e7aefe453fe46d935f4a06f77a08ec40 /target/ppc/kvm.c
parenttarget/ppc: Remove old STATUS file (diff)
downloadqemu-c9137065814609111ec0ed29246388f4ad086732.tar.gz
qemu-c9137065814609111ec0ed29246388f4ad086732.tar.xz
qemu-c9137065814609111ec0ed29246388f4ad086732.zip
ppc: use macros to make cpu type name from string literal
Replace "-" TYPE_POWERPC_CPU when composing cpu type name from cpu model string literal and the same pattern in format strings with POWERPC_CPU_TYPE_SUFFIX and POWERPC_CPU_TYPE_NAME(model) macroses like we do in x86. Later POWERPC_CPU_TYPE_NAME() will be used to define default cpu type per machine type and as bonus it will be consistent and easy grep-able pattern across all other targets that I'm plannig to treat the same way. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target/ppc/kvm.c')
-rw-r--r--target/ppc/kvm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
index b6bd0fa7a6..abcfe13b8a 100644
--- a/target/ppc/kvm.c
+++ b/target/ppc/kvm.c
@@ -2529,7 +2529,7 @@ static int kvm_ppc_register_host_cpu_type(void)
char *suffix;
ppc_cpu_aliases[i].model = g_strdup(object_class_get_name(oc));
- suffix = strstr(ppc_cpu_aliases[i].model, "-"TYPE_POWERPC_CPU);
+ suffix = strstr(ppc_cpu_aliases[i].model, POWERPC_CPU_TYPE_SUFFIX);
if (suffix) {
*suffix = 0;
}