Skip to content

Commit c734af3

Browse files
Marc ZyngierKAGA-KOKO
authored andcommitted
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
1 parent bdf4e2a commit c734af3

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

include/linux/interrupt.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,15 @@ request_percpu_irq(unsigned int irq, irq_handler_t handler,
196196
devname, NULL, percpu_dev_id);
197197
}
198198

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+
199208
extern int __must_check
200209
request_percpu_nmi(unsigned int irq, irq_handler_t handler, const char *name,
201210
const struct cpumask *affinity, void __percpu *dev_id);

0 commit comments

Comments
 (0)