diff options
author | Like Xu <like.xu@linux.intel.com> | 2019-05-19 04:54:23 +0800 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2019-07-05 17:07:42 -0300 |
commit | c447312747aae02298333e61e1ede0793cda47d8 (patch) | |
tree | e09a9406334254a9cb75506c8eb2da4fe30e3c2a /hw/riscv/virt.c | |
parent | fe6b6346e997ff2ecef1e69a0ab9b1e521b68003 (diff) | |
download | qemu-c447312747aae02298333e61e1ede0793cda47d8.zip qemu-c447312747aae02298333e61e1ede0793cda47d8.tar.gz qemu-c447312747aae02298333e61e1ede0793cda47d8.tar.bz2 |
hw/riscv: Replace global smp variables with machine smp properties
The global smp variables in riscv 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-6-like.xu@linux.intel.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
[ehabkost: fix spike_board_init()]
[ehabkost: fix riscv_sifive_e_soc_init()]
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/riscv/virt.c')
-rw-r--r-- | hw/riscv/virt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index d8181a4..ecdc77d 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -371,6 +371,7 @@ static void riscv_virt_board_init(MachineState *machine) char *plic_hart_config; size_t plic_hart_config_len; int i; + unsigned int smp_cpus = machine->smp.cpus; void *fdt; /* Initialize SOC */ |