Skip to content
Snippets Groups Projects
Commit 1f84a048 authored by Kent McLeod's avatar Kent McLeod
Browse files

RISC-V,PLIC: Cannot mask and unmask claimed IRQ

While masking and unmasking IRQs seems to work for some IRQ sources,
there are IRQ sources where masking an IRQ during a claim causes no
more IRQs to be raised after the IRQ is unmasked. This change
explicitly follows the claim->acknowledgement procedure that the
PLIC expects.
parent 4ce8f0a9
No related branches found
No related tags found
No related merge requests found
......@@ -139,7 +139,11 @@ exception_t decodeIRQHandlerInvocation(word_t invLabel, irq_t irq,
void invokeIRQHandler_AckIRQ(irq_t irq)
{
#ifdef CONFIG_ARCH_RISCV
plic_complete_claim(irq);
#else
maskInterrupt(false, irq);
#endif
}
void invokeIRQHandler_SetIRQHandler(irq_t irq, cap_t cap, cte_t *slot)
......@@ -202,7 +206,9 @@ void handleInterrupt(irq_t irq)
printf("Undelivered IRQ: %d\n", (int)irq);
#endif
}
#ifndef CONFIG_ARCH_RISCV
maskInterrupt(true, irq);
#endif
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment