Lines Matching refs:desc

36 bool irq_wait_for_poll(struct irq_desc *desc)  in irq_wait_for_poll()  argument
40 smp_processor_id(), desc->irq_data.irq)) in irq_wait_for_poll()
45 raw_spin_unlock(&desc->lock); in irq_wait_for_poll()
46 while (irqd_irq_inprogress(&desc->irq_data)) in irq_wait_for_poll()
48 raw_spin_lock(&desc->lock); in irq_wait_for_poll()
49 } while (irqd_irq_inprogress(&desc->irq_data)); in irq_wait_for_poll()
51 return !irqd_irq_disabled(&desc->irq_data) && desc->action; in irq_wait_for_poll()
61 static int try_one_irq(struct irq_desc *desc, bool force) in try_one_irq() argument
66 raw_spin_lock(&desc->lock); in try_one_irq()
72 if (irq_settings_is_per_cpu(desc) || in try_one_irq()
73 irq_settings_is_nested_thread(desc) || in try_one_irq()
74 irq_settings_is_polled(desc)) in try_one_irq()
81 if (irqd_irq_disabled(&desc->irq_data) && !force) in try_one_irq()
88 action = desc->action; in try_one_irq()
94 if (irqd_irq_inprogress(&desc->irq_data)) { in try_one_irq()
99 desc->istate |= IRQS_PENDING; in try_one_irq()
104 desc->istate |= IRQS_POLL_INPROGRESS; in try_one_irq()
106 if (handle_irq_event(desc) == IRQ_HANDLED) in try_one_irq()
109 action = desc->action; in try_one_irq()
110 } while ((desc->istate & IRQS_PENDING) && action); in try_one_irq()
111 desc->istate &= ~IRQS_POLL_INPROGRESS; in try_one_irq()
113 raw_spin_unlock(&desc->lock); in try_one_irq()
119 struct irq_desc *desc; in misrouted_irq() local
127 for_each_irq_desc(i, desc) { in misrouted_irq()
134 if (try_one_irq(desc, false)) in misrouted_irq()
145 struct irq_desc *desc; in poll_spurious_irqs() local
152 for_each_irq_desc(i, desc) { in poll_spurious_irqs()
159 state = desc->istate; in poll_spurious_irqs()
165 try_one_irq(desc, true); in poll_spurious_irqs()
191 static void __report_bad_irq(struct irq_desc *desc, irqreturn_t action_ret) in __report_bad_irq() argument
193 unsigned int irq = irq_desc_get_irq(desc); in __report_bad_irq()
213 raw_spin_lock_irqsave(&desc->lock, flags); in __report_bad_irq()
214 for_each_action_of_desc(desc, action) { in __report_bad_irq()
221 raw_spin_unlock_irqrestore(&desc->lock, flags); in __report_bad_irq()
224 static void report_bad_irq(struct irq_desc *desc, irqreturn_t action_ret) in report_bad_irq() argument
230 __report_bad_irq(desc, action_ret); in report_bad_irq()
235 try_misrouted_irq(unsigned int irq, struct irq_desc *desc, in try_misrouted_irq() argument
264 action = desc->action; in try_misrouted_irq()
271 void note_interrupt(struct irq_desc *desc, irqreturn_t action_ret) in note_interrupt() argument
275 if (desc->istate & IRQS_POLL_INPROGRESS || in note_interrupt()
276 irq_settings_is_polled(desc)) in note_interrupt()
280 report_bad_irq(desc, action_ret); in note_interrupt()
321 if (!(desc->threads_handled_last & SPURIOUS_DEFERRED)) { in note_interrupt()
322 desc->threads_handled_last |= SPURIOUS_DEFERRED; in note_interrupt()
337 handled = atomic_read(&desc->threads_handled); in note_interrupt()
339 if (handled != desc->threads_handled_last) { in note_interrupt()
349 desc->threads_handled_last = handled; in note_interrupt()
380 desc->threads_handled_last &= ~SPURIOUS_DEFERRED; in note_interrupt()
391 if (time_after(jiffies, desc->last_unhandled + HZ/10)) in note_interrupt()
392 desc->irqs_unhandled = 1; in note_interrupt()
394 desc->irqs_unhandled++; in note_interrupt()
395 desc->last_unhandled = jiffies; in note_interrupt()
398 irq = irq_desc_get_irq(desc); in note_interrupt()
399 if (unlikely(try_misrouted_irq(irq, desc, action_ret))) { in note_interrupt()
402 desc->irqs_unhandled -= ok; in note_interrupt()
405 desc->irq_count++; in note_interrupt()
406 if (likely(desc->irq_count < 100000)) in note_interrupt()
409 desc->irq_count = 0; in note_interrupt()
410 if (unlikely(desc->irqs_unhandled > 99900)) { in note_interrupt()
414 __report_bad_irq(desc, action_ret); in note_interrupt()
419 desc->istate |= IRQS_SPURIOUS_DISABLED; in note_interrupt()
420 desc->depth++; in note_interrupt()
421 irq_disable(desc); in note_interrupt()
426 desc->irqs_unhandled = 0; in note_interrupt()