From 60f356e86d66a4a22530ec7570f7582af602d200 Mon Sep 17 00:00:00 2001 From: Fabien Chouteau Date: Mon, 31 Jan 2011 11:36:54 +0100 Subject: SPARC: Fix Leon3 cache control The "leon3_cache_control_int" (op_helper.c) function is called within leon3.c which leads to segfault error with the global "env". Now cache control is a CPU feature and everything is handled in op_helper.c. Signed-off-by: Fabien Chouteau Signed-off-by: Blue Swirl --- hw/leon3.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'hw') diff --git a/hw/leon3.c b/hw/leon3.c index 69d8f3b..919f49f 100644 --- a/hw/leon3.c +++ b/hw/leon3.c @@ -56,10 +56,9 @@ static void main_cpu_reset(void *opaque) env->npc = s->entry + 4; } -static void leon3_irq_ack(void *irq_manager, int intno) +void leon3_irq_ack(void *irq_manager, int intno) { grlib_irqmp_ack((DeviceState *)irq_manager, intno); - leon3_cache_control_int(); } static void leon3_set_pil_in(void *opaque, uint32_t pil_in) @@ -130,7 +129,7 @@ static void leon3_generic_hw_init(ram_addr_t ram_size, /* Allocate IRQ manager */ grlib_irqmp_create(0x80000200, env, &cpu_irqs, MAX_PILS, &leon3_set_pil_in); - env->qemu_irq_ack = leon3_irq_ack; + env->qemu_irq_ack = leon3_irq_manager; /* Allocate RAM */ if ((uint64_t)ram_size > (1UL << 30)) { -- cgit v1.1