aboutsummaryrefslogtreecommitdiff
path: root/hw/mips_int.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/mips_int.c')
-rw-r--r--hw/mips_int.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/hw/mips_int.c b/hw/mips_int.c
index ed489f1a16..f4e22dcf85 100644
--- a/hw/mips_int.c
+++ b/hw/mips_int.c
@@ -17,7 +17,7 @@ void cpu_mips_update_irq(CPUState *env)
cpu_reset_interrupt(env, CPU_INTERRUPT_HARD);
}
-void cpu_mips_irq_request(void *opaque, int irq, int level)
+static void cpu_mips_irq_request(void *opaque, int irq, int level)
{
CPUState *env = (CPUState *)opaque;
@@ -31,3 +31,14 @@ void cpu_mips_irq_request(void *opaque, int irq, int level)
}
cpu_mips_update_irq(env);
}
+
+void cpu_mips_irq_init_cpu(CPUState *env)
+{
+ qemu_irq *qi;
+ int i;
+
+ qi = qemu_allocate_irqs(cpu_mips_irq_request, env, 8);
+ for (i = 0; i < 8; i++) {
+ env->irq[i] = qi[i];
+ }
+}