summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2020-12-10 20:25:40 +0100
committerThomas Gleixner <tglx@linutronix.de>2020-12-15 16:19:30 +0100
commit3e2380123fb96987ce958f623207010c667ffa7c (patch)
tree3c0b3082a8f46c2310adfb9b8d5b0602a4f98354
parentf1c6306c0d6b50844ba02c8a53e35405e9c0db05 (diff)
downloadlinux-stable-3e2380123fb96987ce958f623207010c667ffa7c.tar.gz
linux-stable-3e2380123fb96987ce958f623207010c667ffa7c.tar.bz2
linux-stable-3e2380123fb96987ce958f623207010c667ffa7c.zip
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 <tglx@linutronix.de> Link: https://lore.kernel.org/r/20201210194042.967177918@linutronix.de
-rw-r--r--include/linux/irq.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index c332871d59da..4aeb1c4c7e07 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,