From 1bba0dc932e8826a7d030df3767daf0bc339f9a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 8 Feb 2012 03:03:33 +0100 Subject: Rename cpu_reset() to cpu_state_reset() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Frees the identifier cpu_reset for QOM CPUs (manual rename). Don't hide the parameter type behind explicit casts, use static functions with strongly typed argument to indirect. Signed-off-by: Andreas Färber Reviewed-by: Anthony Liguori --- hw/sun4m.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/sun4m.c') diff --git a/hw/sun4m.c b/hw/sun4m.c index 99fb219b3a..4045740667 100644 --- a/hw/sun4m.c +++ b/hw/sun4m.c @@ -283,7 +283,7 @@ static void main_cpu_reset(void *opaque) { CPUState *env = opaque; - cpu_reset(env); + cpu_state_reset(env); env->halted = 0; } @@ -291,7 +291,7 @@ static void secondary_cpu_reset(void *opaque) { CPUState *env = opaque; - cpu_reset(env); + cpu_state_reset(env); env->halted = 1; } -- cgit v1.2.3 From 98cec4a2e6d8bf72a2798036397049b5e906e49c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 14 Mar 2012 01:38:24 +0100 Subject: sparc hw/: Don't use CPUState MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Scripted conversion: for file in hw/sun4m.c hw/sun4u.c hw/grlib.h hw/leon3.c; do sed -i "s/CPUState/CPUSPARCState/g" $file done Signed-off-by: Andreas Färber Acked-by: Anthony Liguori --- hw/sun4m.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'hw/sun4m.c') diff --git a/hw/sun4m.c b/hw/sun4m.c index 4045740667..7bcbf37e98 100644 --- a/hw/sun4m.c +++ b/hw/sun4m.c @@ -228,7 +228,7 @@ void sun4m_irq_info(Monitor *mon) slavio_irq_info(mon, slavio_intctl); } -void cpu_check_irqs(CPUState *env) +void cpu_check_irqs(CPUSPARCState *env) { if (env->pil_in && (env->interrupt_index == 0 || (env->interrupt_index & ~15) == TT_EXTINT)) { @@ -253,7 +253,7 @@ void cpu_check_irqs(CPUState *env) } } -static void cpu_kick_irq(CPUState *env) +static void cpu_kick_irq(CPUSPARCState *env) { env->halted = 0; cpu_check_irqs(env); @@ -262,7 +262,7 @@ static void cpu_kick_irq(CPUState *env) static void cpu_set_irq(void *opaque, int irq, int level) { - CPUState *env = opaque; + CPUSPARCState *env = opaque; if (level) { trace_sun4m_cpu_set_irq_raise(irq); @@ -281,7 +281,7 @@ static void dummy_cpu_set_irq(void *opaque, int irq, int level) static void main_cpu_reset(void *opaque) { - CPUState *env = opaque; + CPUSPARCState *env = opaque; cpu_state_reset(env); env->halted = 0; @@ -289,7 +289,7 @@ static void main_cpu_reset(void *opaque) static void secondary_cpu_reset(void *opaque) { - CPUState *env = opaque; + CPUSPARCState *env = opaque; cpu_state_reset(env); env->halted = 1; @@ -809,7 +809,7 @@ static TypeInfo ram_info = { static void cpu_devinit(const char *cpu_model, unsigned int id, uint64_t prom_addr, qemu_irq **cpu_irqs) { - CPUState *env; + CPUSPARCState *env; env = cpu_init(cpu_model); if (!env) { -- cgit v1.2.3