Skip to contentSkip to conversation

irqchip/riscv-imsic: Report successful hardware retrigger

PATCH Applied Avi Weiss 4 participants 5 messages Oct 26 – Oct 28

Subsystems (4)
lore
Share & tools
lore

Avi Weiss

author
#0 lore raw

PATCH 1/1 irqchip/riscv-imsic: Report successful hardware retrigger

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")
---
 drivers/irqchip/irq-riscv-imsic-platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-riscv-imsic-platform.c +1 -1
index 95ff76e63a69..5f72b2a80887 100644
@@ -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

Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · 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")

Nice catch!

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Avi Weiss
Quoted 10 lines · 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")

Thanks for catching.

Regards,
Anup

Quoted 22 lines
---
 drivers/irqchip/irq-riscv-imsic-platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-riscv-imsic-platform.c +1 -1
index 95ff76e63a69..5f72b2a80887 100644
@@ -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

merge bot Applied
#3 lore raw
In reply to Avi Weiss
The following commit has been merged into the irq/urgent branch of tip:

The following commit has been merged into the irq/urgent branch of tip:

Commit-ID:     8ccba7c98f69009e64b9290f6ee4b2c0d2a87a4e
Gitweb:        https://git.kernel.org/tip/8ccba7c98f69009e64b9290f6ee4b2c0d2a87a4e
Author:        Avi Weiss <[email protected]>
AuthorDate:    Mon, 26 Oct 2026 14:26:42 +02:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Wed, 28 Oct 2026 21:24:51 +01:00

irqchip/riscv-imsic: Report successful hardware retrigger

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")
---
 drivers/irqchip/irq-riscv-imsic-platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-riscv-imsic-platform.c +1 -1
index 643c8e4..52673ff 100644
@@ -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)
merge bot Applied
#4 lore raw
In reply to Avi Weiss
The following commit has been merged into the irq/urgent branch of tip:

The following commit has been merged into the irq/urgent branch of tip:

Commit-ID:     a2f482407d33ebe7f12e30d6cf383ffb1c7d709d
Gitweb:        https://git.kernel.org/tip/a2f482407d33ebe7f12e30d6cf383ffb1c7d709d
Author:        Avi Weiss <[email protected]>
AuthorDate:    Mon, 26 Oct 2026 14:26:42 +02:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Wed, 28 Oct 2026 21:29:36 +01:00

irqchip/riscv-imsic: Report successful hardware retrigger

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")
---
 drivers/irqchip/irq-riscv-imsic-platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-riscv-imsic-platform.c +1 -1
index 643c8e4..52673ff 100644
@@ -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)