diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2019-10-17 19:16:53 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2020-01-07 17:24:29 +0400 |
commit | f4f643882d9dc4676411d1f5fcf9393aa745570b (patch) | |
tree | 11af6c3e2aed7a73ab88b33fab4f8231634fb5b2 /target/cris/cpu.c | |
parent | 3cff81733da62eaea2252e638ea47849cf284ceb (diff) |
cris: improve passing PIC interrupt vector to the CPU
Instead of accessing cpu interrupt vector directly from PIC, send the
vector value over the qemu_irq.
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'target/cris/cpu.c')
-rw-r--r-- | target/cris/cpu.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/target/cris/cpu.c b/target/cris/cpu.c index 7adfd6caf4..6a857f548d 100644 --- a/target/cris/cpu.c +++ b/target/cris/cpu.c @@ -147,6 +147,14 @@ static void cris_cpu_set_irq(void *opaque, int irq, int level) CPUState *cs = CPU(cpu); int type = irq == CRIS_CPU_IRQ ? CPU_INTERRUPT_HARD : CPU_INTERRUPT_NMI; + if (irq == CRIS_CPU_IRQ) { + /* + * The PIC passes us the vector for the IRQ as the value it sends + * over the qemu_irq line + */ + cpu->env.interrupt_vector = level; + } + if (level) { cpu_interrupt(cs, type); } else { |