[tip: irq/core] genirq/chip: Invoke add_interrupt_randomness() in handle_percpu_devid_irq()

tip-bot2 for Michael Kelley posted 1 patch 2 months, 1 week ago
kernel/irq/chip.c | 3 +++
1 file changed, 3 insertions(+)
[tip: irq/core] genirq/chip: Invoke add_interrupt_randomness() in handle_percpu_devid_irq()
Posted by tip-bot2 for Michael Kelley 2 months, 1 week ago
The following commit has been merged into the irq/core branch of tip:

Commit-ID:     fd7400cfcbaaa1f3d1b904711d9daf029e996364
Gitweb:        https://git.kernel.org/tip/fd7400cfcbaaa1f3d1b904711d9daf029e996364
Author:        Michael Kelley <mhklinux@outlook.com>
AuthorDate:    Thu, 02 Apr 2026 13:23:59 -07:00
Committer:     Thomas Gleixner <tglx@kernel.org>
CommitterDate: Thu, 02 Apr 2026 23:03:29 +02:00

genirq/chip: Invoke add_interrupt_randomness() in handle_percpu_devid_irq()

handle_percpu_devid_irq() is a version of handle_percpu_irq() but with the
addition of a pointer to a per-CPU devid.

However, handle_percpu_irq() invokes add_interrupt_randomness(), while
handle_percpu_devid_irq() currently does not.

Add the missing add_interrupt_randomness(), as it is needed when per-CPU
interrupts with devid's are used in VMs for interrupts from the hypervisor.

Signed-off-by: Michael Kelley <mhklinux@outlook.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260402202400.1707-2-mhklkml@zohomail.com
---
 kernel/irq/chip.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 6147a07..6c9b1dc 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -14,6 +14,7 @@
 #include <linux/interrupt.h>
 #include <linux/kernel_stat.h>
 #include <linux/irqdomain.h>
+#include <linux/random.h>
 
 #include <trace/events/irq.h>
 
@@ -929,6 +930,8 @@ void handle_percpu_devid_irq(struct irq_desc *desc)
 			    enabled ? " and unmasked" : "", irq, cpu);
 	}
 
+	add_interrupt_randomness(irq);
+
 	if (chip->irq_eoi)
 		chip->irq_eoi(&desc->irq_data);
 }