target/sparc: Simplify qemu_irq_ack

This is a simple cleanup, since env is passed to qemu_irq_ack it can be
accessed from inside qemu_irq_ack.  Just drop this parameter.

Co-developed-by: Frederic Konrad <konrad.frederic@yahoo.fr>
Signed-off-by: Clément Chigot <chigot@adacore.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240105102421.163554-7-chigot@adacore.com>
This commit is contained in:
Clément Chigot 2024-01-05 11:24:18 +01:00 committed by Philippe Mathieu-Daudé
parent 25145a7d77
commit a318da6b3f
3 changed files with 6 additions and 6 deletions

View file

@ -164,9 +164,9 @@ static void leon3_cache_control_int(CPUSPARCState *env)
} }
} }
static void leon3_irq_ack(void *irq_manager, int intno) static void leon3_irq_ack(CPUSPARCState *env, int intno)
{ {
grlib_irqmp_ack((DeviceState *)irq_manager, intno); grlib_irqmp_ack(env->irq_manager, intno);
} }
/* /*
@ -208,9 +208,9 @@ static void leon3_set_pil_in(void *opaque, int n, int level)
} }
} }
static void leon3_irq_manager(CPUSPARCState *env, void *irq_manager, int intno) static void leon3_irq_manager(CPUSPARCState *env, int intno)
{ {
leon3_irq_ack(irq_manager, intno); leon3_irq_ack(env, intno);
leon3_cache_control_int(env); leon3_cache_control_int(env);
} }

View file

@ -549,7 +549,7 @@ struct CPUArchState {
sparc_def_t def; sparc_def_t def;
void *irq_manager; void *irq_manager;
void (*qemu_irq_ack)(CPUSPARCState *env, void *irq_manager, int intno); void (*qemu_irq_ack)(CPUSPARCState *env, int intno);
/* Leon3 cache control */ /* Leon3 cache control */
uint32_t cache_control; uint32_t cache_control;

View file

@ -160,7 +160,7 @@ void sparc_cpu_do_interrupt(CPUState *cs)
#if !defined(CONFIG_USER_ONLY) #if !defined(CONFIG_USER_ONLY)
/* IRQ acknowledgment */ /* IRQ acknowledgment */
if ((intno & ~15) == TT_EXTINT && env->qemu_irq_ack != NULL) { if ((intno & ~15) == TT_EXTINT && env->qemu_irq_ack != NULL) {
env->qemu_irq_ack(env, env->irq_manager, intno); env->qemu_irq_ack(env, intno);
} }
#endif #endif
} }