mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
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>
This commit is contained in:
parent
bf1457bdbb
commit
c913706581
5 changed files with 9 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue