aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irq.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2010-09-27 08:44:32 -0400
committerThomas Gleixner <tglx@linutronix.de>2010-10-04 06:43:32 -0400
commitf8822657e799b02c55556c99a601261e207a299d (patch)
tree5a263bd4df600d7b090d1216e2b8462c121a7588 /include/linux/irq.h
parent6b8ff3120c758340505dddf08ad685ebb841d5d5 (diff)
genirq: Provide advanced irq chip functions
The low level irq chip functions want access to irq_desc->irq_data. Provide new functions which hand down irq_data instead of the irq number so these functions avoid to call irq_to_desc() which is a radix tree lookup in case of sparse irq. This provides all the old functions except one: end(). end() is a relict of __do_IRQ() and will just go away with the __do_IRQ() code. The replacement for set_affinity() has an extra argument "bool force". The reason for this is to notify the low level code, that the move has to be done right away and cannot be delayed until the next interrupt happens. That's necessary to handle the irq fixup on cpu unplug in the generic code. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> LKML-Reference: <20100927121841.742126604@linutronix.de> Reviewed-by: H. Peter Anvin <hpa@zytor.com> Reviewed-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r--include/linux/irq.h66
1 files changed, 50 insertions, 16 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 002351d83c3f..0c83cbd2df4e 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -118,23 +118,38 @@ struct irq_data {
118 * struct irq_chip - hardware interrupt chip descriptor 118 * struct irq_chip - hardware interrupt chip descriptor
119 * 119 *
120 * @name: name for /proc/interrupts 120 * @name: name for /proc/interrupts
121 * @startup: start up the interrupt (defaults to ->enable if NULL) 121 * @startup: deprecated, replaced by irq_startup
122 * @shutdown: shut down the interrupt (defaults to ->disable if NULL) 122 * @shutdown: deprecated, replaced by irq_shutdown
123 * @enable: enable the interrupt (defaults to chip->unmask if NULL) 123 * @enable: deprecated, replaced by irq_enable
124 * @disable: disable the interrupt 124 * @disable: deprecated, replaced by irq_disable
125 * @ack: start of a new interrupt 125 * @ack: deprecated, replaced by irq_ack
126 * @mask: mask an interrupt source 126 * @mask: deprecated, replaced by irq_mask
127 * @mask_ack: ack and mask an interrupt source 127 * @mask_ack: deprecated, replaced by irq_mask_ack
128 * @unmask: unmask an interrupt source 128 * @unmask: deprecated, replaced by irq_unmask
129 * @eoi: end of interrupt - chip level 129 * @eoi: deprecated, replaced by irq_eoi
130 * @end: end of interrupt - flow level 130 * @end: deprecated, will go away with __do_IRQ()
131 * @set_affinity: set the CPU affinity on SMP machines 131 * @set_affinity: deprecated, replaced by irq_set_affinity
132 * @retrigger: resend an IRQ to the CPU 132 * @retrigger: deprecated, replaced by irq_retrigger
133 * @set_type: set the flow type (IRQ_TYPE_LEVEL/etc.) of an IRQ 133 * @set_type: deprecated, replaced by irq_set_type
134 * @set_wake: enable/disable power-management wake-on of an IRQ 134 * @set_wake: deprecated, replaced by irq_wake
135 * @bus_lock: deprecated, replaced by irq_bus_lock
136 * @bus_sync_unlock: deprecated, replaced by irq_bus_sync_unlock
135 * 137 *
136 * @bus_lock: function to lock access to slow bus (i2c) chips 138 * @irq_startup: start up the interrupt (defaults to ->enable if NULL)
137 * @bus_sync_unlock: function to sync and unlock slow bus (i2c) chips 139 * @irq_shutdown: shut down the interrupt (defaults to ->disable if NULL)
140 * @irq_enable: enable the interrupt (defaults to chip->unmask if NULL)
141 * @irq_disable: disable the interrupt
142 * @irq_ack: start of a new interrupt
143 * @irq_mask: mask an interrupt source
144 * @irq_mask_ack: ack and mask an interrupt source
145 * @irq_unmask: unmask an interrupt source
146 * @irq_eoi: end of interrupt
147 * @irq_set_affinity: set the CPU affinity on SMP machines
148 * @irq_retrigger: resend an IRQ to the CPU
149 * @irq_set_type: set the flow type (IRQ_TYPE_LEVEL/etc.) of an IRQ
150 * @irq_set_wake: enable/disable power-management wake-on of an IRQ
151 * @irq_bus_lock: function to lock access to slow bus (i2c) chips
152 * @irq_bus_sync_unlock:function to sync and unlock slow bus (i2c) chips
138 * 153 *
139 * @release: release function solely used by UML 154 * @release: release function solely used by UML
140 */ 155 */
@@ -161,6 +176,25 @@ struct irq_chip {
161 void (*bus_lock)(unsigned int irq); 176 void (*bus_lock)(unsigned int irq);
162 void (*bus_sync_unlock)(unsigned int irq); 177 void (*bus_sync_unlock)(unsigned int irq);
163 178
179 unsigned int (*irq_startup)(struct irq_data *data);
180 void (*irq_shutdown)(struct irq_data *data);
181 void (*irq_enable)(struct irq_data *data);
182 void (*irq_disable)(struct irq_data *data);
183
184 void (*irq_ack)(struct irq_data *data);
185 void (*irq_mask)(struct irq_data *data);
186 void (*irq_mask_ack)(struct irq_data *data);
187 void (*irq_unmask)(struct irq_data *data);
188 void (*irq_eoi)(struct irq_data *data);
189
190 int (*irq_set_affinity)(struct irq_data *data, const struct cpumask *dest, bool force);
191 int (*irq_retrigger)(struct irq_data *data);
192 int (*irq_set_type)(struct irq_data *data, unsigned int flow_type);
193 int (*irq_set_wake)(struct irq_data *data, unsigned int on);
194
195 void (*irq_bus_lock)(struct irq_data *data);
196 void (*irq_bus_sync_unlock)(struct irq_data *data);
197
164 /* Currently used only by UML, might disappear one day.*/ 198 /* Currently used only by UML, might disappear one day.*/
165#ifdef CONFIG_IRQ_RELEASE_METHOD 199#ifdef CONFIG_IRQ_RELEASE_METHOD
166 void (*release)(unsigned int irq, void *dev_id); 200 void (*release)(unsigned int irq, void *dev_id);