diff options
author | Like Xu <like.xu@linux.intel.com> | 2019-05-19 04:54:27 +0800 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2019-07-05 17:08:03 -0300 |
commit | 33decbd2d3d51742269a78c1d6da3068c61c60d7 (patch) | |
tree | 13fbc02b1866be2de2f6fc4e71bbeaa9214e2162 /hw/sparc64 | |
parent | cc7d44c2e0fc9dff1b9eef857f14a7fd31d71f46 (diff) | |
download | 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/sparc64')
-rw-r--r-- | hw/sparc64/sun4u.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 4230b17b87..5d87be811d 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -697,8 +697,8 @@ static void sun4uv_init(MemoryRegion *address_space_mem, &FW_CFG_IO(dev)->comb_iomem); fw_cfg = FW_CFG(dev); - fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, (uint16_t)smp_cpus); - fw_cfg_add_i16(fw_cfg, FW_CFG_MAX_CPUS, (uint16_t)max_cpus); + fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, (uint16_t)machine->smp.cpus); + fw_cfg_add_i16(fw_cfg, FW_CFG_MAX_CPUS, (uint16_t)machine->smp.max_cpus); fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, (uint64_t)ram_size); fw_cfg_add_i16(fw_cfg, FW_CFG_MACHINE_ID, hwdef->machine_id); fw_cfg_add_i64(fw_cfg, FW_CFG_KERNEL_ADDR, kernel_entry); |