* [PATCH] irqchip/riscv-imsic: Report successful hardware retrigger
@ 2026-10-26 12:26 Avi Weiss
2026-10-27 9:53 ` Björn Töpel
2026-10-27 11:43 ` Anup Patel
0 siblings, 2 replies; 3+ messages in thread
From: Avi Weiss @ 2026-10-26 12:26 UTC (permalink / raw)
To: Anup Patel, Thomas Gleixner
Cc: Radu Rendec, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Bjorn Topel, linux-riscv, linux-kernel,
Avi Weiss
imsic_irq_retrigger() writes to the IMSIC MSI register to retrigger
an interrupt, but returns 0. The IRQ core treats zero as failure and
may schedule a software resend despite the hardware retrigger.
Return 1 after the MSI write to report successful hardware
retriggering and prevent the unnecessary software resend.
Fixes: 027e125acdba ("irqchip/riscv-imsic: Add device MSI domain support for platform devices")
Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
---
drivers/irqchip/irq-riscv-imsic-platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-riscv-imsic-platform.c b/drivers/irqchip/irq-riscv-imsic-platform.c
index 95ff76e63a69..5f72b2a80887 100644
--- a/drivers/irqchip/irq-riscv-imsic-platform.c
+++ b/drivers/irqchip/irq-riscv-imsic-platform.c
@@ -61,7 +61,7 @@ static int imsic_irq_retrigger(struct irq_data *d)
local = per_cpu_ptr(imsic->global.local, vec->cpu);
writel_relaxed(vec->local_id, local->msi_va);
- return 0;
+ return 1;
}
static void imsic_irq_ack(struct irq_data *d)
base-commit: 6b4b543fa18757297ac756a6fe6e64f506b7844a
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] irqchip/riscv-imsic: Report successful hardware retrigger
2026-10-26 12:26 [PATCH] irqchip/riscv-imsic: Report successful hardware retrigger Avi Weiss
@ 2026-10-27 9:53 ` Björn Töpel
2026-10-27 11:43 ` Anup Patel
1 sibling, 0 replies; 3+ messages in thread
From: Björn Töpel @ 2026-10-27 9:53 UTC (permalink / raw)
To: Avi Weiss, Anup Patel, Thomas Gleixner
Cc: Radu Rendec, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Bjorn Topel, linux-riscv, linux-kernel,
Avi Weiss
Avi Weiss <thnkslprpt@gmail.com> writes:
> imsic_irq_retrigger() writes to the IMSIC MSI register to retrigger
> an interrupt, but returns 0. The IRQ core treats zero as failure and
> may schedule a software resend despite the hardware retrigger.
>
> Return 1 after the MSI write to report successful hardware
> retriggering and prevent the unnecessary software resend.
>
> Fixes: 027e125acdba ("irqchip/riscv-imsic: Add device MSI domain support for platform devices")
> Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
Nice catch!
Reviewed-by: Björn Töpel <bjorn@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] irqchip/riscv-imsic: Report successful hardware retrigger
2026-10-26 12:26 [PATCH] irqchip/riscv-imsic: Report successful hardware retrigger Avi Weiss
2026-10-27 9:53 ` Björn Töpel
@ 2026-10-27 11:43 ` Anup Patel
1 sibling, 0 replies; 3+ messages in thread
From: Anup Patel @ 2026-10-27 11:43 UTC (permalink / raw)
To: Avi Weiss
Cc: Thomas Gleixner, Radu Rendec, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Alexandre Ghiti, Bjorn Topel, linux-riscv,
linux-kernel
On Mon, Oct 26, 2026 at 5:56 PM Avi Weiss <thnkslprpt@gmail.com> wrote:
>
> imsic_irq_retrigger() writes to the IMSIC MSI register to retrigger
> an interrupt, but returns 0. The IRQ core treats zero as failure and
> may schedule a software resend despite the hardware retrigger.
>
> Return 1 after the MSI write to report successful hardware
> retriggering and prevent the unnecessary software resend.
>
> Fixes: 027e125acdba ("irqchip/riscv-imsic: Add device MSI domain support for platform devices")
> Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
Thanks for catching.
Reviewed-by: Anup Patel <anup@brainfault.org>
Regards,
Anup
> ---
> drivers/irqchip/irq-riscv-imsic-platform.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/irqchip/irq-riscv-imsic-platform.c b/drivers/irqchip/irq-riscv-imsic-platform.c
> index 95ff76e63a69..5f72b2a80887 100644
> --- a/drivers/irqchip/irq-riscv-imsic-platform.c
> +++ b/drivers/irqchip/irq-riscv-imsic-platform.c
> @@ -61,7 +61,7 @@ static int imsic_irq_retrigger(struct irq_data *d)
>
> local = per_cpu_ptr(imsic->global.local, vec->cpu);
> writel_relaxed(vec->local_id, local->msi_va);
> - return 0;
> + return 1;
> }
>
> static void imsic_irq_ack(struct irq_data *d)
>
> base-commit: 6b4b543fa18757297ac756a6fe6e64f506b7844a
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-27 11:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-26 12:26 [PATCH] irqchip/riscv-imsic: Report successful hardware retrigger Avi Weiss
2026-10-27 9:53 ` Björn Töpel
2026-10-27 11:43 ` Anup Patel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®