aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/raspi.c
diff options
context:
space:
mode:
authorLike Xu <like.xu@linux.intel.com>2019-05-19 04:54:26 +0800
committerEduardo Habkost <ehabkost@redhat.com>2019-07-05 17:08:03 -0300
commitcc7d44c2e0fc9dff1b9eef857f14a7fd31d71f46 (patch)
tree2c97f7323d5a5d36050c5fd36ebdcaf426f74f70 /hw/arm/raspi.c
parent0e11fc6955dddf752987b261a0176edf31b34dec (diff)
downloadqemu-cc7d44c2e0fc9dff1b9eef857f14a7fd31d71f46.zip
qemu-cc7d44c2e0fc9dff1b9eef857f14a7fd31d71f46.tar.gz
qemu-cc7d44c2e0fc9dff1b9eef857f14a7fd31d71f46.tar.bz2
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/raspi.c')
-rw-r--r--hw/arm/raspi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
index cb23330..5b2620a 100644
--- a/hw/arm/raspi.c
+++ b/hw/arm/raspi.c
@@ -116,7 +116,7 @@ static void setup_boot(MachineState *machine, int version, size_t ram_size)
binfo.board_id = raspi_boardid[version];
binfo.ram_size = ram_size;
- binfo.nb_cpus = smp_cpus;
+ binfo.nb_cpus = machine->smp.cpus;
if (version <= 2) {
/* The rpi1 and 2 require some custom setup code to run in Secure
@@ -194,7 +194,7 @@ static void raspi_init(MachineState *machine, int version)
/* Setup the SOC */
object_property_add_const_link(OBJECT(&s->soc), "ram", OBJECT(&s->ram),
&error_abort);
- object_property_set_int(OBJECT(&s->soc), smp_cpus, "enabled-cpus",
+ object_property_set_int(OBJECT(&s->soc), machine->smp.cpus, "enabled-cpus",
&error_abort);
int board_rev = version == 3 ? 0xa02082 : 0xa21041;
object_property_set_int(OBJECT(&s->soc), board_rev, "board-rev",