mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-11 03:24:58 -06:00
target/avr: Only execute one interrupt at a time
We cannot deliver two interrupts simultaneously; the first interrupt handler must execute first. Reviewed-by: Michael Rolnik <mrolnik@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
9e1b2375da
commit
cecaad5401
1 changed files with 3 additions and 6 deletions
|
@ -28,7 +28,6 @@
|
||||||
|
|
||||||
bool avr_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
|
bool avr_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
|
||||||
{
|
{
|
||||||
bool ret = false;
|
|
||||||
AVRCPU *cpu = AVR_CPU(cs);
|
AVRCPU *cpu = AVR_CPU(cs);
|
||||||
CPUAVRState *env = &cpu->env;
|
CPUAVRState *env = &cpu->env;
|
||||||
|
|
||||||
|
@ -38,8 +37,7 @@ bool avr_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
|
||||||
avr_cpu_do_interrupt(cs);
|
avr_cpu_do_interrupt(cs);
|
||||||
|
|
||||||
cs->interrupt_request &= ~CPU_INTERRUPT_RESET;
|
cs->interrupt_request &= ~CPU_INTERRUPT_RESET;
|
||||||
|
return true;
|
||||||
ret = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (interrupt_request & CPU_INTERRUPT_HARD) {
|
if (interrupt_request & CPU_INTERRUPT_HARD) {
|
||||||
|
@ -52,11 +50,10 @@ bool avr_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
|
||||||
if (!env->intsrc) {
|
if (!env->intsrc) {
|
||||||
cs->interrupt_request &= ~CPU_INTERRUPT_HARD;
|
cs->interrupt_request &= ~CPU_INTERRUPT_HARD;
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
ret = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void avr_cpu_do_interrupt(CPUState *cs)
|
void avr_cpu_do_interrupt(CPUState *cs)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue