aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/spapr.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2016-10-28 22:09:37 +1100
committerDavid Gibson <david@gibson.dropbear.id.au>2017-01-31 10:10:13 +1100
commitd6e166c08203f47017555f5f52b70f35399c824c (patch)
treeabd7480a77a7937b71d3fabd363fe80271ce8fae /hw/ppc/spapr.c
parent1d1be34d26b66069e20cbbcd798ea57763a0f152 (diff)
downloadqemu-d6e166c08203f47017555f5f52b70f35399c824c.zip
qemu-d6e166c08203f47017555f5f52b70f35399c824c.tar.gz
qemu-d6e166c08203f47017555f5f52b70f35399c824c.tar.bz2
ppc: Rename cpu_version to compat_pvr
The 'cpu_version' field in PowerPCCPU is badly named. It's named after the 'cpu-version' device tree property where it is advertised, but that meaning may not be obvious in most places it appears. Worse, it doesn't even really correspond to that device tree property. The property contains either the processor's PVR, or, if the CPU is running in a compatibility mode, a special "logical PVR" representing which mode. Rename the cpu_version field, and a number of related variables to compat_pvr to make this clearer. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'hw/ppc/spapr.c')
-rw-r--r--hw/ppc/spapr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index a4774fb..cd95435 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -148,8 +148,8 @@ static int spapr_fixup_cpu_smt_dt(void *fdt, int offset, PowerPCCPU *cpu,
uint32_t gservers_prop[smt_threads * 2];
int index = ppc_get_vcpu_dt_id(cpu);
- if (cpu->cpu_version) {
- ret = fdt_setprop_cell(fdt, offset, "cpu-version", cpu->cpu_version);
+ if (cpu->compat_pvr) {
+ ret = fdt_setprop_cell(fdt, offset, "cpu-version", cpu->compat_pvr);
if (ret < 0) {
return ret;
}