aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-25 20:52:53 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-25 20:52:53 -0400
commit839767e79e7bdf06f241a47701f0f64b8e2d3f61 (patch)
tree779e50183bac6bd4b87b6d0d1be0f444bca17428 /include
parent94df491c4a01b39d81279a68386158eb02656712 (diff)
parenta2e8461a2ce5e8140b7374eb68af0d09e36e07ff (diff)
Merge branch 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: genirq: Provide locked setter for chip, handler, name genirq: Provide a lockdep helper genirq; Remove the last leftovers of the old sparse irq code
Diffstat (limited to 'include')
-rw-r--r--include/linux/irqdesc.h45
1 files changed, 33 insertions, 12 deletions
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h
index 00218371518b..15e6c3905f41 100644
--- a/include/linux/irqdesc.h
+++ b/include/linux/irqdesc.h
@@ -100,13 +100,6 @@ struct irq_desc {
100extern struct irq_desc irq_desc[NR_IRQS]; 100extern struct irq_desc irq_desc[NR_IRQS];
101#endif 101#endif
102 102
103/* Will be removed once the last users in power and sh are gone */
104extern struct irq_desc *irq_to_desc_alloc_node(unsigned int irq, int node);
105static inline struct irq_desc *move_irq_desc(struct irq_desc *desc, int node)
106{
107 return desc;
108}
109
110#ifdef CONFIG_GENERIC_HARDIRQS 103#ifdef CONFIG_GENERIC_HARDIRQS
111 104
112static inline struct irq_data *irq_desc_get_irq_data(struct irq_desc *desc) 105static inline struct irq_data *irq_desc_get_irq_data(struct irq_desc *desc)
@@ -178,24 +171,52 @@ static inline int irq_has_action(unsigned int irq)
178 return desc->action != NULL; 171 return desc->action != NULL;
179} 172}
180 173
181#ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT 174/* caller has locked the irq_desc and both params are valid */
182static inline int irq_balancing_disabled(unsigned int irq) 175static inline void __irq_set_handler_locked(unsigned int irq,
176 irq_flow_handler_t handler)
183{ 177{
184 struct irq_desc *desc; 178 struct irq_desc *desc;
185 179
186 desc = irq_to_desc(irq); 180 desc = irq_to_desc(irq);
187 return desc->status & IRQ_NO_BALANCING_MASK; 181 desc->handle_irq = handler;
188} 182}
189#endif
190 183
191/* caller has locked the irq_desc and both params are valid */ 184/* caller has locked the irq_desc and both params are valid */
185static inline void
186__irq_set_chip_handler_name_locked(unsigned int irq, struct irq_chip *chip,
187 irq_flow_handler_t handler, const char *name)
188{
189 struct irq_desc *desc;
190
191 desc = irq_to_desc(irq);
192 irq_desc_get_irq_data(desc)->chip = chip;
193 desc->handle_irq = handler;
194 desc->name = name;
195}
196
197#ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT
192static inline void __set_irq_handler_unlocked(int irq, 198static inline void __set_irq_handler_unlocked(int irq,
193 irq_flow_handler_t handler) 199 irq_flow_handler_t handler)
194{ 200{
201 __irq_set_handler_locked(irq, handler);
202}
203
204static inline int irq_balancing_disabled(unsigned int irq)
205{
195 struct irq_desc *desc; 206 struct irq_desc *desc;
196 207
197 desc = irq_to_desc(irq); 208 desc = irq_to_desc(irq);
198 desc->handle_irq = handler; 209 return desc->status & IRQ_NO_BALANCING_MASK;
210}
211#endif
212
213static inline void
214irq_set_lockdep_class(unsigned int irq, struct lock_class_key *class)
215{
216 struct irq_desc *desc = irq_to_desc(irq);
217
218 if (desc)
219 lockdep_set_class(&desc->lock, class);
199} 220}
200 221
201#ifdef CONFIG_IRQ_PREFLOW_FASTEOI 222#ifdef CONFIG_IRQ_PREFLOW_FASTEOI