The method of interrupt acknowledgment varies between interrupt
controllers. On GIC interupts are implicitly ACKed when reading the
interrupt id from GICC_IAR before passing control to the interrupt
handler, and completion is signaled post handling via the GICC_EOIR.
On x86 controllers acknowledgment happens after interrupt handling
is complete.
Remove the explicit interrupt acknledgment from
`uk_intctlr_handle_irq()` as it causes duplicate acknowledgment on
Arm, and move it to `ops->handle_irq()` of the xPIC driver.
Notice: Picking individual commits in this PR will break the build.
Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1103
/* Skip all normal handlers if an event handler handled the
* event
*/
- goto exit_ack;
+ goto exit;
}
for (i = 0; i < MAX_HANDLERS_PER_IRQ; i++) {
__uk_test_and_set_bit(0, &sched_have_pending_events);
if (h->func(h->arg) == 1)
- goto exit_ack;
+ goto exit;
}
/*
* Acknowledge interrupts even in the case when there was no handler for
*/
trace_uk_intctlr_unhandled_irq(irq);
-exit_ack:
+exit:
#if CONFIG_LIBUKINTCTLR_ISR_ECTX_ASSERTIONS
ukarch_ectx_assert_equal(ectx);
#endif /* CONFIG_LIBUKINTCTLR_ISR_ECTX_ASSERTIONS */
- intctrl_ack_irq(irq);
return;
}
#include <x86/traps.h>
#include <uk/asm/cfi.h>
+#include <uk/intctlr.h>
#define ENTRY(X) .global X ; .type X, @function ; X:
movq %rsp, %rdi
movq $\irqno, %rsi
- call _ukplat_irq_handle
+ call uk_intctlr_xpic_handle_irq
addq $__REGS_PAD_SIZE, %rsp /* we have some padding */
.cfi_adjust_cfa_offset -__REGS_PAD_SIZE