From fe6b6346e997ff2ecef1e69a0ab9b1e521b68003 Mon Sep 17 00:00:00 2001 From: Like Xu Date: Sun, 19 May 2019 04:54:22 +0800 Subject: hw/ppc: Replace global smp variables with machine smp properties The global smp variables in ppc 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 Message-Id: <20190518205428.90532-5-like.xu@linux.intel.com> Acked-by: David Gibson Signed-off-by: Eduardo Habkost --- hw/ppc/e500.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'hw/ppc/e500.c') diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index bfda1266af..a3eac7f057 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -308,6 +308,7 @@ static int ppce500_load_device_tree(PPCE500MachineState *pms, bool dry_run) { MachineState *machine = MACHINE(pms); + unsigned int smp_cpus = machine->smp.cpus; const PPCE500MachineClass *pmc = PPCE500_MACHINE_GET_CLASS(pms); CPUPPCState *env = first_cpu->env_ptr; int ret = -1; @@ -735,6 +736,7 @@ static DeviceState *ppce500_init_mpic_qemu(PPCE500MachineState *pms, SysBusDevice *s; int i, j, k; MachineState *machine = MACHINE(pms); + unsigned int smp_cpus = machine->smp.cpus; const PPCE500MachineClass *pmc = PPCE500_MACHINE_GET_CLASS(pms); dev = qdev_create(NULL, TYPE_OPENPIC); @@ -847,6 +849,7 @@ void ppce500_init(MachineState *machine) struct boot_info *boot_info; int dt_size; int i; + unsigned int smp_cpus = machine->smp.cpus; /* irq num for pin INTA, INTB, INTC and INTD is 1, 2, 3 and * 4 respectively */ unsigned int pci_irq_nrs[PCI_NUM_PINS] = {1, 2, 3, 4}; -- cgit v1.2.3