[tip:irq/core] genirq: Introduce helper function irq_data_get_affinity_mask()
From: tip-bot for Jiang Liu
Date: Sat Jun 20 2015 - 13:23:10 EST
Commit-ID: c64301a230a64dfc2fcf4581cd98a2d703f3c057
Gitweb: http://git.kernel.org/tip/c64301a230a64dfc2fcf4581cd98a2d703f3c057
Author: Jiang Liu <jiang.liu@xxxxxxxxxxxxxxx>
AuthorDate: Mon, 1 Jun 2015 16:05:23 +0800
Committer: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
CommitDate: Fri, 12 Jun 2015 16:54:21 +0200
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@xxxxxxxxxxxxxxx>
Acked-by: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Cc: Tony Luck <tony.luck@xxxxxxxxx>
Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Cc: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Cc: Yinghai Lu <yinghai@xxxxxxxxxx>
Cc: Borislav Petkov <bp@xxxxxxxxx>
Cc: Jason Cooper <jason@xxxxxxxxxxxxxx>
Cc: Kevin Cernekee <cernekee@xxxxxxxxx>
Cc: Arnd Bergmann <arnd@xxxxxxxx>
Link: http://lkml.kernel.org/r/1433145945-789-15-git-send-email-jiang.liu@xxxxxxxxxxxxxxx
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
include/linux/irq.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/include/linux/irq.h b/include/linux/irq.h
index b3b82a5..1e0ccef 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,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at http://www.tux.org/lkml/