summaryrefslogtreecommitdiffstats
path: root/include/linux/irq.h
diff options
context:
space:
mode:
authorJiang Liu <jiang.liu@linux.intel.com>2015-06-01 04:05:16 -0400
committerThomas Gleixner <tglx@linutronix.de>2015-09-16 09:46:49 -0400
commit449e9cae58b06be1293858ec8e5d8cb728238baa (patch)
treedb2fc542aebb64f9e27b11f6d77103a9eacf8ee6 /include/linux/irq.h
parent4df7f54d16ebe9c37631182de84c4347f0e44db3 (diff)
genirq: Move field 'node' from irq_data into irq_common_data
NUMA node information is per-irq instead of per-irqchip, so move it into struct irq_common_data. Also use CONFIG_NUMA to guard irq_common_data.node. Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> 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-8-git-send-email-jiang.liu@linux.intel.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r--include/linux/irq.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index e54ae8295460..ebcc5c6745eb 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -129,9 +129,13 @@ struct irq_domain;
129 * struct irq_common_data - per irq data shared by all irqchips 129 * struct irq_common_data - per irq data shared by all irqchips
130 * @state_use_accessors: status information for irq chip functions. 130 * @state_use_accessors: status information for irq chip functions.
131 * Use accessor functions to deal with it 131 * Use accessor functions to deal with it
132 * @node: node index useful for balancing
132 */ 133 */
133struct irq_common_data { 134struct irq_common_data {
134 unsigned int state_use_accessors; 135 unsigned int state_use_accessors;
136#ifdef CONFIG_NUMA
137 unsigned int node;
138#endif
135}; 139};
136 140
137/** 141/**
@@ -139,7 +143,6 @@ struct irq_common_data {
139 * @mask: precomputed bitmask for accessing the chip registers 143 * @mask: precomputed bitmask for accessing the chip registers
140 * @irq: interrupt number 144 * @irq: interrupt number
141 * @hwirq: hardware interrupt number, local to the interrupt domain 145 * @hwirq: hardware interrupt number, local to the interrupt domain
142 * @node: node index useful for balancing
143 * @common: point to data shared by all irqchips 146 * @common: point to data shared by all irqchips
144 * @chip: low level interrupt hardware access 147 * @chip: low level interrupt hardware access
145 * @domain: Interrupt translation domain; responsible for mapping 148 * @domain: Interrupt translation domain; responsible for mapping
@@ -156,7 +159,6 @@ struct irq_data {
156 u32 mask; 159 u32 mask;
157 unsigned int irq; 160 unsigned int irq;
158 unsigned long hwirq; 161 unsigned long hwirq;
159 unsigned int node;
160 struct irq_common_data *common; 162 struct irq_common_data *common;
161 struct irq_chip *chip; 163 struct irq_chip *chip;
162 struct irq_domain *domain; 164 struct irq_domain *domain;
@@ -664,9 +666,18 @@ static inline u32 irq_get_trigger_type(unsigned int irq)
664 return d ? irqd_get_trigger_type(d) : 0; 666 return d ? irqd_get_trigger_type(d) : 0;
665} 667}
666 668
667static inline int irq_data_get_node(struct irq_data *d) 669static inline int irq_common_data_get_node(struct irq_common_data *d)
668{ 670{
671#ifdef CONFIG_NUMA
669 return d->node; 672 return d->node;
673#else
674 return 0;
675#endif
676}
677
678static inline int irq_data_get_node(struct irq_data *d)
679{
680 return irq_common_data_get_node(d->common);
670} 681}
671 682
672static inline struct cpumask *irq_get_affinity_mask(int irq) 683static inline struct cpumask *irq_get_affinity_mask(int irq)