]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
genirq: Add request_percpu_irq_affinity() helper
authorMarc Zyngier <maz@kernel.org>
Mon, 20 Oct 2025 12:29:34 +0000 (13:29 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 27 Oct 2025 16:16:35 +0000 (17:16 +0100)
While it would be nice to simply make request_percpu_irq() take an affinity
mask, the churn is likely to be on the irritating side given that most
drivers do not give a damn about affinities.

So take the more innocuous path to provide a helper that parallels
request_percpu_irq(), with an affinity as a bonus argument.

Yes, request_percpu_irq_affinity() is a bit of a mouthful.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Will Deacon <will@kernel.org>
Link: https://patch.msgid.link/20251020122944.3074811-18-maz@kernel.org
include/linux/interrupt.h

index 81506ab759b815b2001e8fd0e010ef36f9c6b450..fa62ab556ee327bfc8258086a782a2d1a0632c41 100644 (file)
@@ -196,6 +196,15 @@ request_percpu_irq(unsigned int irq, irq_handler_t handler,
                                    devname, NULL, percpu_dev_id);
 }
 
+static inline int __must_check
+request_percpu_irq_affinity(unsigned int irq, irq_handler_t handler,
+                           const char *devname, const cpumask_t *affinity,
+                           void __percpu *percpu_dev_id)
+{
+       return __request_percpu_irq(irq, handler, 0,
+                                   devname, affinity, percpu_dev_id);
+}
+
 extern int __must_check
 request_percpu_nmi(unsigned int irq, irq_handler_t handler, const char *name,
                   const struct cpumask *affinity, void __percpu *dev_id);