[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 11/11] target/avr: Fix interrupt execution
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 11/11] target/avr: Fix interrupt execution |
Date: |
Sat, 13 Mar 2021 17:54:45 +0100 |
From: Ivanov Arkasha <ivanovrkasha@gmail.com>
Only one interrupt is in progress at the moment.
It is only necessary to set to reset interrupt_request
after all interrupts have been executed.
Signed-off-by: Ivanov Arkasha <ivanovrkasha@gmail.com>
Message-Id: <20210312164754.18437-1-arkaisp2021@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
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 b4532de2523..35e10195940 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.26.2
- Re: [PATCH 06/11] hw/gpio/avr_gpio: Simplify avr_gpio_write_port using extract32(), (continued)
- [PATCH 07/11] hw/gpio/avr_gpio: Add tracing for reads and writes, Philippe Mathieu-Daudé, 2021/03/13
- [PATCH 08/11] hw/avr/arduino: Add D13 LED, Philippe Mathieu-Daudé, 2021/03/13
- [PATCH 09/11] hw/avr/arduino: Replace magic number by gpio_port_index() call, Philippe Mathieu-Daudé, 2021/03/13
- [PATCH 10/11] target/avr: Fix some comment spelling errors, Philippe Mathieu-Daudé, 2021/03/13
- [PATCH 11/11] target/avr: Fix interrupt execution,
Philippe Mathieu-Daudé <=
- Re: [PATCH 00/11] AVR patch queue for QEMU 6.0, Michael Rolnik, 2021/03/13
- Re: [PATCH 00/11] AVR patch queue for QEMU 6.0, Philippe Mathieu-Daudé, 2021/03/14