aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/irqdesc.h29
1 files changed, 24 insertions, 5 deletions
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h
index 1595f9176b43..15e6c3905f41 100644
--- a/include/linux/irqdesc.h
+++ b/include/linux/irqdesc.h
@@ -171,25 +171,44 @@ static inline int irq_has_action(unsigned int irq)
171 return desc->action != NULL; 171 return desc->action != NULL;
172} 172}
173 173
174#ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT 174/* caller has locked the irq_desc and both params are valid */
175static inline int irq_balancing_disabled(unsigned int irq) 175static inline void __irq_set_handler_locked(unsigned int irq,
176 irq_flow_handler_t handler)
176{ 177{
177 struct irq_desc *desc; 178 struct irq_desc *desc;
178 179
179 desc = irq_to_desc(irq); 180 desc = irq_to_desc(irq);
180 return desc->status & IRQ_NO_BALANCING_MASK; 181 desc->handle_irq = handler;
181} 182}
182#endif
183 183
184/* 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
185static inline void __set_irq_handler_unlocked(int irq, 198static inline void __set_irq_handler_unlocked(int irq,
186 irq_flow_handler_t handler) 199 irq_flow_handler_t handler)
187{ 200{
201 __irq_set_handler_locked(irq, handler);
202}
203
204static inline int irq_balancing_disabled(unsigned int irq)
205{
188 struct irq_desc *desc; 206 struct irq_desc *desc;
189 207
190 desc = irq_to_desc(irq); 208 desc = irq_to_desc(irq);
191 desc->handle_irq = handler; 209 return desc->status & IRQ_NO_BALANCING_MASK;
192} 210}
211#endif
193 212
194static inline void 213static inline void
195irq_set_lockdep_class(unsigned int irq, struct lock_class_key *class) 214irq_set_lockdep_class(unsigned int irq, struct lock_class_key *class)