* [PATCH] target/avr: Fix interrupt execution
@ 2021-03-12 16:47 Arkadiy
0 siblings, 0 replies; only message in thread
From: Arkadiy @ 2021-03-12 16:47 UTC (permalink / raw)
To: qemu-devel; +Cc: NDNF, S.E.Harris, Arkasha, mrolnik, f4bug
From: NDNF <arkaisp2021@gmail.com>
Only one interrupt is in progress at the moment.It is necessary to set to
reset interrupt_request only after all interrupts have been executed
Signed-off-by: Arkasha <ivanovrkasha@gmail.com>
---
target/avr/helper.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/target/avr/helper.c b/target/avr/helper.c
index 65880b9928..9f20cc198e 100644
--- a/target/avr/helper.c
+++ b/target/avr/helper.c
@@ -49,7 +49,9 @@ bool avr_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
cc->tcg_ops->do_interrupt(cs);
env->intsrc &= env->intsrc - 1; /* clear the interrupt */
- cs->interrupt_request &= ~CPU_INTERRUPT_HARD;
+ if (!env->intsrc) {
+ cs->interrupt_request &= ~CPU_INTERRUPT_HARD;
+ }
ret = true;
}
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-12 19:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-12 16:47 [PATCH] target/avr: Fix interrupt execution Arkadiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).