Skip to contentSkip to conversation

riscv: enable software resend of irqs

PATCH Applied Conor Dooley 5 participants 6 messages Jul 29, 2022 – Oct 13, 2022 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 riscv: enable software resend of irqs

The PLIC specification does not describe the interrupt pendings bits as read-write, only that they "can be read". To allow for retriggering of interrupts (and the use of the irq debugfs interface) enable HARDIRQS_SW_RESEND for RISC-V.

---
 arch/riscv/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/riscv/Kconfig +1 -0
index 55d2cc458ace..d8a132426c64 100644
@@ -69,6 +69,7 @@ config RISCV
 	select GENERIC_SMP_IDLE_THREAD
 	select GENERIC_TIME_VSYSCALL if MMU && 64BIT
 	select GENERIC_VDSO_TIME_NS if HAVE_GENERIC_VDSO
+	select HARDIRQS_SW_RESEND
 	select HAVE_ARCH_AUDITSYSCALL
 	select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL
 	select HAVE_ARCH_JUMP_LABEL_RELATIVE if !XIP_KERNEL
Signature · 7 lines
2.36.1


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Conor Dooley

The PLIC specification does not describe the interrupt pendings bits as read-write, only that they "can be read". To allow for retriggering of interrupts (and the use of the irq debugfs interface) enable HARDIRQS_SW_RESEND for RISC-V.

Waking up an old thread. FWIW,

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

maintainer Acked-by Tested-by
#2 lore raw
Quoted 7 lines · On Mon, 10 Oct 2022 04:21:38 PDT (-0700), [email protected] wrote:
Quoted 5 lines · Conor Dooley

The PLIC specification does not describe the interrupt pendings bits as read-write, only that they "can be read". To allow for retriggering of interrupts (and the use of the irq debugfs interface) enable HARDIRQS_SW_RESEND for RISC-V.

Quoted 6 lines
Quoted 2 lines

Waking up an old thread. FWIW,

Thanks. This look reasonable to me, not sure if the irqchip folks have an opinion though?

In theory the PLIC isn't the only interrupt controller (and that spec predates most of the implementations), but the SiFive PLIC derived interrupt controllers have become a defacto standard and IIRC they're the only thing shipping right now so I think it's OK to just stick this in arch code. We could mark it as "if SIFIVE_PLIC" or something, but I don't know if that's worth doing.

Either way, this isn't really my thing. Happy to take it via the RISC-V tree, but

if you want it via the irqchip tree. I put it over at palmer/riscv-irq_sw_resend in case you want to do a shared tree or something, but that seems pretty overkill to me here. It's passing all my tests, but that's just QEMU.

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

Acked-by
#3 lore raw
Quoted 19 lines · Palmer Dabbelt
Quoted 7 lines · On Mon, 10 Oct 2022 04:21:38 PDT (-0700), [email protected] wrote:
Quoted 5 lines · Conor Dooley

The PLIC specification does not describe the interrupt pendings bits as read-write, only that they "can be read". To allow for retriggering of interrupts (and the use of the irq debugfs interface) enable HARDIRQS_SW_RESEND for RISC-V.

Quoted 6 lines
Quoted 2 lines

Waking up an old thread. FWIW,

Thanks. This look reasonable to me, not sure if the irqchip folks have an opinion though?

Quoted 6 lines

In theory the PLIC isn't the only interrupt controller (and that spec predates most of the implementations), but the SiFive PLIC derived interrupt controllers have become a defacto standard and IIRC they're the only thing shipping right now so I think it's OK to just stick this in arch code. We could mark it as "if SIFIVE_PLIC" or something, but I don't know if that's worth doing.

Setting it at the architecture level is at least consistent with what other arches are doing. If we need to fix it one day, we'll do it globally.

Quoted 5 lines

Either way, this isn't really my thing. Happy to take it via the RISC-V tree, but

Please take it directly, and feel free to add my

to it.

Thanks,

	M.
Signature · 6 lines
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
maintainer
#4 lore raw
Quoted 28 lines · Marc Zyngier
Quoted 19 lines · Palmer Dabbelt
Quoted 7 lines · On Mon, 10 Oct 2022 04:21:38 PDT (-0700), [email protected] wrote:
Quoted 5 lines · Conor Dooley

The PLIC specification does not describe the interrupt pendings bits as read-write, only that they "can be read". To allow for retriggering of interrupts (and the use of the irq debugfs interface) enable HARDIRQS_SW_RESEND for RISC-V.

Quoted 6 lines
Quoted 2 lines

Waking up an old thread. FWIW,

Thanks. This look reasonable to me, not sure if the irqchip folks have an opinion though?

Quoted 6 lines

In theory the PLIC isn't the only interrupt controller (and that spec predates most of the implementations), but the SiFive PLIC derived interrupt controllers have become a defacto standard and IIRC they're the only thing shipping right now so I think it's OK to just stick this in arch code. We could mark it as "if SIFIVE_PLIC" or something, but I don't know if that's worth doing.

Quoted 3 lines

Setting it at the architecture level is at least consistent with what other arches are doing. If we need to fix it one day, we'll do it globally.

Works for me.

Quoted 11 lines
Quoted 5 lines

Either way, this isn't really my thing. Happy to take it via the RISC-V tree, but Acked-by: Palmer Dabbelt <[email protected]>

Please take it directly, and feel free to add my

to it.

Thanks, it's on riscv/for-next.

Quoted 7 lines

Thanks,

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

#5 lore raw
In reply to Conor Dooley
Quoted 6 lines · Conor Dooley

The PLIC specification does not describe the interrupt pendings bits as read-write, only that they "can be read". To allow for retriggering of interrupts (and the use of the irq debugfs interface) enable HARDIRQS_SW_RESEND for RISC-V.

Applied, thanks!

[1/1] riscv: enable software resend of irqs

      https://git.kernel.org/palmer/c/c45fc916c2b2

Best regards,

Signature · 6 lines
Palmer Dabbelt <[email protected]>

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv