On Tue, Sep 14, 2021 at 8:12 PM Rishiyur Nikhil <
nik...@bluespec.com> wrote:
>
> The protocol is that harts should first "claim" the interrupt from the
> PLIC (see "Interrupt Claims" section of PLIC spec).
>
> This is an atomic action on the PLIC, so even if multiple harts
> attempt to claim, only one will succeed. Presumably that hart is the
> one that will then service the interrupt.
Yes, this is correct.
This also means if we had N harts with IRQx enabled then all
N harts attempt to claim IRQx but only one succeeds whereas
other N-1 harts would have wasted CPU cycles in failed attempt
to claim IRQx. The Linux PLIC driver tries ensures that IRQx
is enabled only for one of the harts so that other harts don't
waste CPU cycles.
Regards,
Anup
> To view this discussion on the web visit
https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/CAAVo%2BP%3D2Kq6f-hYArkebj94s2xou6CHTAJ7pHbC_JDsL%3D1r86Q%40mail.gmail.com.