1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
| 133 irqreturn_t 134 handle_irq_event_percpu(struct irq_desc *desc, struct irqaction *action) 135 { 136 irqreturn_t retval = IRQ_NONE; 137 unsigned int flags = 0, irq = desc->irq_data.irq; 138 139 do { 140 irqreturn_t res; 141 142 trace_irq_handler_entry(irq, action); 143 res = action->handler(irq, action->dev_id); 144 trace_irq_handler_exit(irq, action, res); 145 146 if (WARN_ONCE(!irqs_disabled(),"irq %u handler %pF enabled interrupts\n", 147 irq, action->handler)) 148 local_irq_disable(); 149 150 switch (res) { 151 case IRQ_WAKE_THREAD: 152 /* 153 * Catch drivers which return WAKE_THREAD but 154 * did not set up a thread function 155 */ 156 if (unlikely(!action->thread_fn)) { 157 warn_no_thread(irq, action); 158 break; 159 } 160 161 __irq_wake_thread(desc, action); 162 163 /* Fall through to add to randomness */ 164 case IRQ_HANDLED: 165 flags |= action->flags; 166 break; 167 168 default: 169 break; 170 } 171 172 retval |= res; 173 action = action->next; 174 } while (action); 175 176 add_interrupt_randomness(irq, flags); 177 178 if (!noirqdebug) 179 note_interrupt(irq, desc, retval); 180 return retval; 181 }
|