mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
target/nios2: Use env_cpu, env_archcpu
Cleanup in the boilerplate that each target must define. Replace nios2_env_get_cpu with env_archcpu. The combination CPU(nios2_env_get_cpu) should have used ENV_GET_CPU to begin; use env_cpu now. Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
f8600ba221
commit
29168c6585
3 changed files with 6 additions and 14 deletions
|
@ -54,12 +54,9 @@ static void nios2_pic_cpu_handler(void *opaque, int irq, int level)
|
|||
|
||||
void nios2_check_interrupts(CPUNios2State *env)
|
||||
{
|
||||
Nios2CPU *cpu = nios2_env_get_cpu(env);
|
||||
CPUState *cs = CPU(cpu);
|
||||
|
||||
if (env->irq_pending) {
|
||||
env->irq_pending = 0;
|
||||
cpu_interrupt(cs, CPU_INTERRUPT_HARD);
|
||||
cpu_interrupt(env_cpu(env), CPU_INTERRUPT_HARD);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue