summaryrefslogtreecommitdiffstats
path: root/hw/s390x/sclp.c
diff options
context:
space:
mode:
authorLike Xu2019-05-18 22:54:24 +0200
committerEduardo Habkost2019-07-05 22:08:03 +0200
commitae71ed8610514d9154df887b024f269554bdb8f0 (patch)
treea0b3bd3a283be1c2599be30f1c980de8cced798d /hw/s390x/sclp.c
parenthw/riscv: Replace global smp variables with machine smp properties (diff)
downloadqemu-ae71ed8610514d9154df887b024f269554bdb8f0.tar.gz
qemu-ae71ed8610514d9154df887b024f269554bdb8f0.tar.xz
qemu-ae71ed8610514d9154df887b024f269554bdb8f0.zip
hw/s390x: Replace global smp variables with machine smp properties
The global smp variables in s390x are replaced with smp machine properties. A local variable of the same name would be introduced in the declaration phase if it's used widely in the context OR replace it on the spot if it's only used once. No semantic changes. Signed-off-by: Like Xu <like.xu@linux.intel.com> Message-Id: <20190518205428.90532-7-like.xu@linux.intel.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> [ehabkost: fix build failure at VCPU_IRQ_BUF_SIZE] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> fixup! hw/s390x: Replace global smp variables with machine smp properties Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/s390x/sclp.c')
-rw-r--r--hw/s390x/sclp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c
index 4510a800cb..fac7c3bb6c 100644
--- a/hw/s390x/sclp.c
+++ b/hw/s390x/sclp.c
@@ -64,7 +64,7 @@ static void read_SCP_info(SCLPDevice *sclp, SCCB *sccb)
prepare_cpu_entries(sclp, read_info->entries, &cpu_count);
read_info->entries_cpu = cpu_to_be16(cpu_count);
read_info->offset_cpu = cpu_to_be16(offsetof(ReadInfo, entries));
- read_info->highest_cpu = cpu_to_be16(max_cpus - 1);
+ read_info->highest_cpu = cpu_to_be16(machine->smp.max_cpus - 1);
read_info->ibc_val = cpu_to_be32(s390_get_ibc_val());