aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-05-27 05:17:50 +0200
committerAndreas Färber <afaerber@suse.de>2013-07-09 21:20:28 +0200
commit4917cf44326a1bda2fd7f27303aff7a25ad86518 (patch)
treed9c153504b0806990d0c5646c886e16150835d1a /hw/ppc
parent80b7cd735417b0883a026d79a513629a2817cdb4 (diff)
cpu: Replace cpu_single_env with CPUState current_cpu
Move it to qom/cpu.h. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/ppc')
-rw-r--r--hw/ppc/mpc8544_guts.c3
-rw-r--r--hw/ppc/prep.c6
2 files changed, 5 insertions, 4 deletions
diff --git a/hw/ppc/mpc8544_guts.c b/hw/ppc/mpc8544_guts.c
index 2e2f2eb91f..a10abe9789 100644
--- a/hw/ppc/mpc8544_guts.c
+++ b/hw/ppc/mpc8544_guts.c
@@ -68,7 +68,8 @@ static uint64_t mpc8544_guts_read(void *opaque, hwaddr addr,
unsigned size)
{
uint32_t value = 0;
- CPUPPCState *env = cpu_single_env;
+ PowerPCCPU *cpu = POWERPC_CPU(current_cpu);
+ CPUPPCState *env = &cpu->env;
addr &= MPC8544_GUTS_MMIO_SIZE - 1;
switch (addr) {
diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
index 7b2559d347..d07dd014c6 100644
--- a/hw/ppc/prep.c
+++ b/hw/ppc/prep.c
@@ -417,10 +417,10 @@ static const MemoryRegionOps PPC_prep_io_ops = {
static void cpu_request_exit(void *opaque, int irq, int level)
{
- CPUPPCState *env = cpu_single_env;
+ CPUState *cpu = current_cpu;
- if (env && level) {
- cpu_exit(CPU(ppc_env_get_cpu(env)));
+ if (cpu && level) {
+ cpu_exit(cpu);
}
}