aboutsummaryrefslogtreecommitdiff
path: root/hw/nios2
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2019-03-22 18:44:44 -0700
committerRichard Henderson <richard.henderson@linaro.org>2019-06-10 07:03:42 -0700
commit29168c6585673402e5ff285d84fd1d44de977424 (patch)
treef066622153b729577a75fb19ea7c826016a2b04c /hw/nios2
parentf8600ba22188595bca6c098ab66b9641b10bca99 (diff)
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>
Diffstat (limited to 'hw/nios2')
-rw-r--r--hw/nios2/cpu_pic.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/hw/nios2/cpu_pic.c b/hw/nios2/cpu_pic.c
index 6bccce2f32..9e39955bd1 100644
--- a/hw/nios2/cpu_pic.c
+++ b/hw/nios2/cpu_pic.c
@@ -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);
}
}