From 8968f588e3e42183a49802f1fa18af0f95cf5ba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Thu, 3 May 2012 03:14:37 +0200 Subject: [PATCH] sun4m: Use cpu_sparc_init() to obtain SPARCCPU MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Needed for {main,secondary}_cpu_reset(). Signed-off-by: Andreas Färber Acked-by: Blue Swirl --- hw/sun4m.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/sun4m.c b/hw/sun4m.c index 34088ad185..c5d2e40527 100644 --- a/hw/sun4m.c +++ b/hw/sun4m.c @@ -809,13 +809,15 @@ static TypeInfo ram_info = { static void cpu_devinit(const char *cpu_model, unsigned int id, uint64_t prom_addr, qemu_irq **cpu_irqs) { + SPARCCPU *cpu; CPUSPARCState *env; - env = cpu_init(cpu_model); - if (!env) { + cpu = cpu_sparc_init(cpu_model); + if (cpu == NULL) { fprintf(stderr, "qemu: Unable to find Sparc CPU definition\n"); exit(1); } + env = &cpu->env; cpu_sparc_set_id(env, id); if (id == 0) {