summaryrefslogtreecommitdiffstats
path: root/hw/arm/sabrelite.c
diff options
context:
space:
mode:
authorLike Xu2019-05-18 22:54:26 +0200
committerEduardo Habkost2019-07-05 22:08:03 +0200
commitcc7d44c2e0fc9dff1b9eef857f14a7fd31d71f46 (patch)
tree2c97f7323d5a5d36050c5fd36ebdcaf426f74f70 /hw/arm/sabrelite.c
parenthw/i386: Replace global smp variables with machine smp properties (diff)
downloadqemu-cc7d44c2e0fc9dff1b9eef857f14a7fd31d71f46.tar.gz
qemu-cc7d44c2e0fc9dff1b9eef857f14a7fd31d71f46.tar.xz
qemu-cc7d44c2e0fc9dff1b9eef857f14a7fd31d71f46.zip
hw/arm: Replace global smp variables with machine smp properties
The global smp variables in arm are replaced with smp machine properties. The init_cpus() and *_create_rpu() are refactored to pass MachineState. 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> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20190518205428.90532-9-like.xu@linux.intel.com> [ehabkost: Fix hw/arm/sbsa-ref.c and hw/arm/aspeed.c] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/arm/sabrelite.c')
-rw-r--r--hw/arm/sabrelite.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/arm/sabrelite.c b/hw/arm/sabrelite.c
index 97230ac827..934f4c9261 100644
--- a/hw/arm/sabrelite.c
+++ b/hw/arm/sabrelite.c
@@ -105,7 +105,7 @@ static void sabrelite_init(MachineState *machine)
sabrelite_binfo.kernel_filename = machine->kernel_filename;
sabrelite_binfo.kernel_cmdline = machine->kernel_cmdline;
sabrelite_binfo.initrd_filename = machine->initrd_filename;
- sabrelite_binfo.nb_cpus = smp_cpus;
+ sabrelite_binfo.nb_cpus = machine->smp.cpus;
sabrelite_binfo.secure_boot = true;
sabrelite_binfo.write_secondary_boot = sabrelite_write_secondary;
sabrelite_binfo.secondary_cpu_reset_hook = sabrelite_reset_secondary;