]> Git Repo - qemu.git/blobdiff - hw/intc/sh_intc.c
s390x: fix error propagation in kvm-flic's realize
[qemu.git] / hw / intc / sh_intc.c
index f397950cbbe6a59a3d930d1c3b1ba6b7c886b180..6ce2a8084f03d9c93007b4d8c40cdac5508cf235 100644 (file)
@@ -8,6 +8,9 @@
  * This code is licensed under the GPL.
  */
 
+#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "cpu.h"
 #include "hw/sh4/sh_intc.h"
 #include "hw/hw.h"
 #include "hw/sh4/sh.h"
@@ -42,16 +45,15 @@ void sh_intc_toggle_source(struct intc_source *source,
         pending_changed = 1;
 
     if (pending_changed) {
-        CPUState *cpu = CPU(sh_env_get_cpu(first_cpu));
         if (source->pending) {
             source->parent->pending++;
             if (source->parent->pending == 1) {
-                cpu_interrupt(cpu, CPU_INTERRUPT_HARD);
+                cpu_interrupt(first_cpu, CPU_INTERRUPT_HARD);
             }
         } else {
             source->parent->pending--;
             if (source->parent->pending == 0) {
-                cpu_reset_interrupt(cpu, CPU_INTERRUPT_HARD);
+                cpu_reset_interrupt(first_cpu, CPU_INTERRUPT_HARD);
             }
        }
     }
This page took 0.020483 seconds and 4 git commands to generate.