diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2019-03-22 18:44:44 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2019-06-10 07:03:42 -0700 |
commit | 29168c6585673402e5ff285d84fd1d44de977424 (patch) | |
tree | f066622153b729577a75fb19ea7c826016a2b04c /hw | |
parent | f8600ba22188595bca6c098ab66b9641b10bca99 (diff) | |
download | qemu-29168c6585673402e5ff285d84fd1d44de977424.zip qemu-29168c6585673402e5ff285d84fd1d44de977424.tar.gz qemu-29168c6585673402e5ff285d84fd1d44de977424.tar.bz2 |
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')
-rw-r--r-- | hw/nios2/cpu_pic.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/hw/nios2/cpu_pic.c b/hw/nios2/cpu_pic.c index 6bccce2..9e39955 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); } } |