[PATCH V5 3/3] irqchip/sifive-plic: Fixup thead, c900-plic request_threaded_irq with ONESHOT

Vincent Pelletier plr.vincent at gmail.com
Sun Oct 31 22:11:34 PDT 2021


On Thu, 28 Oct 2021 13:55:23 +0300, Nikita Shubin <nikita.shubin at maquefel.me> wrote:
> This indeed happens with SiFive PLIC. I am currently tinkering with
> da9063 RTC on SiFive Unmatched, and ALARM irq fires only once.

Happy to see someone else having this issue. I hit this issue in July
and tried to get feedback, but nothing happened and I gave up:
  http://lists.infradead.org/pipermail/linux-riscv/2021-July/007441.html

My uneducated guess, by spying on the registers behind the kernel's
back (see the python script I attached), was that this could be
specific to level-signalled interrupts, where the IRQ re-triggers in
the PLIC right after being cleared but after being unbound from any
hart. Then the "IRQ pending" flag is set (causing the IRQ edge which
would normally trigger interrupt handling in associated hart) without
anything noticing, so it will never be cleared and never be handled.

> However
> with changes proposed by Guo Ren in plic_thead_irq_eoi, everything
> begins to work fine.

Great news, so this issue will be fixed in a better way than my RFC.
RFC which can hence be discarded in patchwork, I believe:
  https://patchwork.kernel.org/project/linux-riscv/patch/8c36c1a28ce63b5120765fd3c636944bfec8bee9.1625882423.git.plr.vincent@gmail.com/
(I'm not sure if I can do it myself)

Regards,
-- 
Vincent Pelletier
GPG fingerprint 983A E8B7 3B91 1598 7A92 3845 CAC9 3691 4257 B0C1



More information about the linux-riscv mailing list