Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

genirq: Add request_percpu_irq_affinity() helper

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

authored by

Marc Zyngier and committed by
Thomas Gleixner
c734af3b bdf4e2ac

+9
+9
include/linux/interrupt.h
··· 196 196 devname, NULL, percpu_dev_id); 197 197 } 198 198 199 + static inline int __must_check 200 + request_percpu_irq_affinity(unsigned int irq, irq_handler_t handler, 201 + const char *devname, const cpumask_t *affinity, 202 + void __percpu *percpu_dev_id) 203 + { 204 + return __request_percpu_irq(irq, handler, 0, 205 + devname, affinity, percpu_dev_id); 206 + } 207 + 199 208 extern int __must_check 200 209 request_percpu_nmi(unsigned int irq, irq_handler_t handler, const char *name, 201 210 const struct cpumask *affinity, void __percpu *dev_id);