From: Thomas Gleixner Date: Thu, 10 Dec 2020 19:25:40 +0000 (+0100) Subject: genirq: Provide irq_get_effective_affinity() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3e2380123fb96987ce958f623207010c667ffa7c;p=linux.git genirq: Provide irq_get_effective_affinity() Provide an accessor to the effective interrupt affinity mask. Going to be used to replace open coded fiddling with the irq descriptor. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20201210194042.967177918@linutronix.de --- diff --git a/include/linux/irq.h b/include/linux/irq.h index c332871d59da9..4aeb1c4c7e07b 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -906,6 +906,13 @@ struct cpumask *irq_data_get_effective_affinity_mask(struct irq_data *d) } #endif +static inline struct cpumask *irq_get_effective_affinity_mask(unsigned int irq) +{ + struct irq_data *d = irq_get_irq_data(irq); + + return d ? irq_data_get_effective_affinity_mask(d) : NULL; +} + unsigned int arch_dynirq_lower_bound(unsigned int from); int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node,