summaryrefslogtreecommitdiffstats
path: root/hw/ppc/prep.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-05-29 22:29:20 +0200
committerAndreas Färber <afaerber@suse.de>2013-07-09 21:32:54 +0200
commit182735efaf956ccab50b6d74a4fed163e0f35660 (patch)
tree1852a22a43ce7130f22fc96cd96712cfa7e00749 /hw/ppc/prep.c
parent9b056fcc5becd183fa2bdec9d259bf26b5f71207 (diff)
downloadhqemu-182735efaf956ccab50b6d74a4fed163e0f35660.zip
hqemu-182735efaf956ccab50b6d74a4fed163e0f35660.tar.gz
cpu: Make first_cpu and next_cpu CPUState
Move next_cpu from CPU_COMMON to CPUState. Move first_cpu variable to qom/cpu.h. gdbstub needs to use CPUState::env_ptr for now. cpu_copy() no longer needs to save and restore cpu_next. Acked-by: Paolo Bonzini <pbonzini@redhat.com> [AF: Rebased, simplified cpu_copy()] Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/ppc/prep.c')
-rw-r--r--hw/ppc/prep.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
index d07dd01..19f2442 100644
--- a/hw/ppc/prep.c
+++ b/hw/ppc/prep.c
@@ -605,8 +605,9 @@ static void ppc_prep_init(QEMUMachineInitArgs *args)
/* PCI -> ISA bridge */
pci = pci_create_simple(pci_bus, PCI_DEVFN(1, 0), "i82378");
cpu_exit_irq = qemu_allocate_irqs(cpu_request_exit, NULL, 1);
+ cpu = POWERPC_CPU(first_cpu);
qdev_connect_gpio_out(&pci->qdev, 0,
- first_cpu->irq_inputs[PPC6xx_INPUT_INT]);
+ cpu->env.irq_inputs[PPC6xx_INPUT_INT]);
qdev_connect_gpio_out(&pci->qdev, 1, *cpu_exit_irq);
sysbus_connect_irq(&pcihost->busdev, 0, qdev_get_gpio_in(&pci->qdev, 9));
sysbus_connect_irq(&pcihost->busdev, 1, qdev_get_gpio_in(&pci->qdev, 11));
@@ -651,7 +652,8 @@ static void ppc_prep_init(QEMUMachineInitArgs *args)
}
isa_create_simple(isa_bus, "i8042");
- sysctrl->reset_irq = first_cpu->irq_inputs[PPC6xx_INPUT_HRESET];
+ cpu = POWERPC_CPU(first_cpu);
+ sysctrl->reset_irq = cpu->env.irq_inputs[PPC6xx_INPUT_HRESET];
portio_list_init(port_list, NULL, prep_portio_list, sysctrl, "prep");
portio_list_add(port_list, get_system_io(), 0x0);
OpenPOWER on IntegriCloud