diff options
author | Andrew Jones <drjones@redhat.com> | 2020-12-15 18:48:15 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2021-01-08 15:13:38 +0000 |
commit | 9cd07db94b41e849dab8a547fb778718a11f487d (patch) | |
tree | 8bafe1d9f8d8b5cd3213b056057499e88123c14b /include | |
parent | 4663b72a48fd540cbe16053b01d6839a95656440 (diff) |
hw/arm/virt: Remove virt machine state 'smp_cpus'
virt machine's 'smp_cpus' and machine->smp.cpus must always have the
same value. And, anywhere we have virt machine state we have machine
state. So let's remove the redundancy. Also, to make it easier to see
that machine->smp is the true source for "smp_cpus" and "max_cpus",
avoid passing them in function parameters, preferring instead to get
them from the state.
No functional change intended.
Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: David Edmondson <david.edmondson@oracle.com>
Reviewed-by: Ying Fang <fangying1@huawei.com>
Message-id: 20201215174815.51520-1-drjones@redhat.com
[PMM: minor formatting tweak to smp_cpus variable declaration]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/arm/virt.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h index abf54fab49..e4a2d21642 100644 --- a/include/hw/arm/virt.h +++ b/include/hw/arm/virt.h @@ -151,7 +151,6 @@ struct VirtMachineState { MemMapEntry *memmap; char *pciehb_nodename; const int *irqmap; - int smp_cpus; void *fdt; int fdt_size; uint32_t clock_phandle; @@ -182,7 +181,7 @@ static inline int virt_gicv3_redist_region_count(VirtMachineState *vms) assert(vms->gic_version == VIRT_GIC_VERSION_3); - return vms->smp_cpus > redist0_capacity ? 2 : 1; + return MACHINE(vms)->smp.cpus > redist0_capacity ? 2 : 1; } #endif /* QEMU_ARM_VIRT_H */ |