diff options
author | Andreas Färber <afaerber@suse.de> | 2012-05-03 05:45:10 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2012-06-04 23:00:44 +0200 |
commit | 05769733e046e01a08696bcdf0beae8284fc1662 (patch) | |
tree | 643e65cc32e9e0291674b1f665fc0adff7288262 /hw | |
parent | 38f92da6e7b07e8ffa0681b60ad314c568f9fd21 (diff) | |
download | qemu-05769733e046e01a08696bcdf0beae8284fc1662.tar.gz qemu-05769733e046e01a08696bcdf0beae8284fc1662.tar.bz2 qemu-05769733e046e01a08696bcdf0beae8284fc1662.zip |
spapr: Use cpu_ppc_init() to obtain PowerPCCPU
Needed for spapr_cpu_reset().
Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/spapr.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/hw/spapr.c b/hw/spapr.c index cca20f9a51..26723309b2 100644 --- a/hw/spapr.c +++ b/hw/spapr.c @@ -518,6 +518,7 @@ static void ppc_spapr_init(ram_addr_t ram_size, const char *initrd_filename, const char *cpu_model) { + PowerPCCPU *cpu; CPUPPCState *env; int i; MemoryRegion *sysmem = get_system_memory(); @@ -560,12 +561,13 @@ static void ppc_spapr_init(ram_addr_t ram_size, cpu_model = kvm_enabled() ? "host" : "POWER7"; } for (i = 0; i < smp_cpus; i++) { - env = cpu_init(cpu_model); - - if (!env) { + cpu = cpu_ppc_init(cpu_model); + if (cpu == NULL) { fprintf(stderr, "Unable to find PowerPC CPU definition\n"); exit(1); } + env = &cpu->env; + /* Set time-base frequency to 512 MHz */ cpu_ppc_tb_init(env, TIMEBASE_FREQ); qemu_register_reset(spapr_cpu_reset, env); |