diff options
author | Richard Henderson | 2019-03-23 02:44:44 +0100 |
---|---|---|
committer | Richard Henderson | 2019-06-10 16:03:42 +0200 |
commit | 29168c6585673402e5ff285d84fd1d44de977424 (patch) | |
tree | f066622153b729577a75fb19ea7c826016a2b04c /hw | |
parent | target/moxie: Use env_cpu, env_archcpu (diff) | |
download | qemu-29168c6585673402e5ff285d84fd1d44de977424.tar.gz qemu-29168c6585673402e5ff285d84fd1d44de977424.tar.xz qemu-29168c6585673402e5ff285d84fd1d44de977424.zip |
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 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); } } |