diff options
author | Jiang Liu <jiang.liu@linux.intel.com> | 2015-06-01 04:05:23 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-06-12 10:54:21 -0400 |
commit | c64301a230a64dfc2fcf4581cd98a2d703f3c057 (patch) | |
tree | 06a4061df6a5e3ce29966b1c7bf3d756233df9aa | |
parent | 6783011b48096b9a0c239d0f7645f93070b6eefd (diff) |
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 <jiang.liu@linux.intel.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Link: http://lkml.kernel.org/r/1433145945-789-15-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | include/linux/irq.h | 12 |
1 files changed, 12 insertions, 0 deletions
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) | |||
645 | return d->node; | 645 | return d->node; |
646 | } | 646 | } |
647 | 647 | ||
648 | static inline struct cpumask *irq_get_affinity_mask(int irq) | ||
649 | { | ||
650 | struct irq_data *d = irq_get_irq_data(irq); | ||
651 | |||
652 | return d ? d->affinity : NULL; | ||
653 | } | ||
654 | |||
655 | static inline struct cpumask *irq_data_get_affinity_mask(struct irq_data *d) | ||
656 | { | ||
657 | return d->affinity; | ||
658 | } | ||
659 | |||
648 | unsigned int arch_dynirq_lower_bound(unsigned int from); | 660 | unsigned int arch_dynirq_lower_bound(unsigned int from); |
649 | 661 | ||
650 | int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node, | 662 | int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node, |