summaryrefslogtreecommitdiffstats
path: root/hw/openrisc
diff options
context:
space:
mode:
authorLike Xu2019-05-18 22:54:27 +0200
committerEduardo Habkost2019-07-05 22:08:03 +0200
commit33decbd2d3d51742269a78c1d6da3068c61c60d7 (patch)
tree13fbc02b1866be2de2f6fc4e71bbeaa9214e2162 /hw/openrisc
parenthw/arm: Replace global smp variables with machine smp properties (diff)
downloadqemu-33decbd2d3d51742269a78c1d6da3068c61c60d7.tar.gz
qemu-33decbd2d3d51742269a78c1d6da3068c61c60d7.tar.xz
qemu-33decbd2d3d51742269a78c1d6da3068c61c60d7.zip
hw: Replace global smp variables with MachineState for all remaining archs
The global smp variables in alpha/hppa/mips/openrisc/sparc*/xtensa codes are replaced with smp properties from 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-10-like.xu@linux.intel.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/openrisc')
-rw-r--r--hw/openrisc/openrisc_sim.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c
index 87b9feaa96..b85f0df323 100644
--- a/hw/openrisc/openrisc_sim.c
+++ b/hw/openrisc/openrisc_sim.c
@@ -130,6 +130,7 @@ static void openrisc_sim_init(MachineState *machine)
qemu_irq *cpu_irqs[2];
qemu_irq serial_irq;
int n;
+ unsigned int smp_cpus = machine->smp.cpus;
for (n = 0; n < smp_cpus; n++) {
cpu = OPENRISC_CPU(cpu_create(machine->cpu_type));