From: Jiang Liu Date: Mon, 1 Jun 2015 08:05:23 +0000 (+0800) Subject: genirq: Introduce helper function irq_data_get_affinity_mask() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c64301a230a64dfc2fcf4581cd98a2d703f3c057;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git genirq: Introduce helper function irq_data_get_affinity_mask() Introduce helper function irq_data_get_affinity_mask() and irq_get_affinity_mask() to hide implementation details, so we could move field 'affinity' from struct irq_data into struct irq_common_data later. Signed-off-by: Jiang Liu Acked-by: Russell King Cc: Konrad Rzeszutek Wilk Cc: Tony Luck Cc: Bjorn Helgaas Cc: Benjamin Herrenschmidt Cc: Randy Dunlap Cc: Yinghai Lu Cc: Borislav Petkov Cc: Jason Cooper Cc: Kevin Cernekee Cc: Arnd Bergmann Link: http://lkml.kernel.org/r/1433145945-789-15-git-send-email-jiang.liu@linux.intel.com Signed-off-by: Thomas Gleixner --- diff --git a/include/linux/irq.h b/include/linux/irq.h index b3b82a5344c8..1e0ccef205ed 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -645,6 +645,18 @@ static inline int irq_data_get_node(struct irq_data *d) return d->node; } +static inline struct cpumask *irq_get_affinity_mask(int irq) +{ + struct irq_data *d = irq_get_irq_data(irq); + + return d ? d->affinity : NULL; +} + +static inline struct cpumask *irq_data_get_affinity_mask(struct irq_data *d) +{ + return d->affinity; +} + unsigned int arch_dynirq_lower_bound(unsigned int from); int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node,