15 #include <linux/module.h>
31 struct irq_desc *
desc = irq_get_desc_lock(irq, &flags, 0);
40 irq_put_desc_unlock(desc, flags);
67 irq_put_desc_busunlock(desc, flags);
82 struct irq_desc *
desc = irq_get_desc_lock(irq, &flags, 0);
87 irq_put_desc_unlock(desc, flags);
109 irq_put_desc_unlock(desc, flags);
123 struct irq_desc *
desc = irq_get_desc_lock(irq, &flags, 0);
128 irq_put_desc_unlock(desc, flags);
141 static void irq_state_clr_disabled(
struct irq_desc *
desc)
146 static void irq_state_set_disabled(
struct irq_desc *
desc)
165 irq_state_clr_disabled(desc);
168 if (desc->
irq_data.chip->irq_startup) {
170 irq_state_clr_masked(desc);
181 irq_state_set_disabled(desc);
183 if (desc->
irq_data.chip->irq_shutdown)
185 else if (desc->
irq_data.chip->irq_disable)
189 irq_state_set_masked(desc);
194 irq_state_clr_disabled(desc);
195 if (desc->
irq_data.chip->irq_enable)
199 irq_state_clr_masked(desc);
204 irq_state_set_disabled(desc);
205 if (desc->
irq_data.chip->irq_disable) {
207 irq_state_set_masked(desc);
213 if (desc->
irq_data.chip->irq_enable)
222 if (desc->
irq_data.chip->irq_disable)
231 if (desc->
irq_data.chip->irq_mask_ack)
238 irq_state_set_masked(desc);
243 if (desc->
irq_data.chip->irq_mask) {
245 irq_state_set_masked(desc);
251 if (desc->
irq_data.chip->irq_unmask) {
253 irq_state_clr_masked(desc);
275 kstat_incr_irqs_this_cpu(irq, desc);
298 static bool irq_check_poll(
struct irq_desc *desc)
323 if (!irq_check_poll(desc))
327 kstat_incr_irqs_this_cpu(irq, desc);
345 static void cond_unmask_irq(
struct irq_desc *desc)
354 if (!irqd_irq_disabled(&desc->
irq_data) &&
376 if (!irq_check_poll(desc))
380 kstat_incr_irqs_this_cpu(irq, desc);
393 cond_unmask_irq(desc);
400 #ifdef CONFIG_IRQ_PREFLOW_FASTEOI
401 static inline void preflow_handler(
struct irq_desc *desc)
403 if (desc->preflow_handler)
404 desc->preflow_handler(&desc->
irq_data);
407 static inline void preflow_handler(
struct irq_desc *desc) { }
426 if (!irq_check_poll(desc))
430 kstat_incr_irqs_this_cpu(irq, desc);
445 preflow_handler(desc);
449 cond_unmask_irq(desc);
491 if (!irq_check_poll(desc)) {
497 kstat_incr_irqs_this_cpu(irq, desc);
514 if (!irqd_irq_disabled(&desc->
irq_data) &&
522 !irqd_irq_disabled(&desc->
irq_data));
529 #ifdef CONFIG_IRQ_EDGE_EOI_HANDLER
538 void handle_edge_eoi_irq(
unsigned int irq,
struct irq_desc *desc)
552 if (!irq_check_poll(desc)) {
557 kstat_incr_irqs_this_cpu(irq, desc);
566 !irqd_irq_disabled(&desc->
irq_data));
584 struct irq_chip *chip = irq_desc_get_chip(desc);
586 kstat_incr_irqs_this_cpu(irq, desc);
611 struct irq_chip *chip = irq_desc_get_chip(desc);
616 kstat_incr_irqs_this_cpu(irq, desc);
621 trace_irq_handler_entry(irq, action);
622 res = action->
handler(irq, dev_id);
623 trace_irq_handler_exit(irq, action, res);
634 struct irq_desc *desc = irq_get_desc_buslock(irq, &flags, 0);
650 irq_state_set_disabled(desc);
657 irq_settings_set_noprobe(desc);
658 irq_settings_set_norequest(desc);
659 irq_settings_set_nothread(desc);
663 irq_put_desc_busunlock(desc, flags);
679 struct irq_desc *desc = irq_get_desc_lock(irq, &flags, 0);
683 irq_settings_clr_and_set(desc, clr,
set);
687 if (irq_settings_has_no_balance_set(desc))
689 if (irq_settings_is_per_cpu(desc))
691 if (irq_settings_can_move_pcntxt(desc))
693 if (irq_settings_is_level(desc))
696 irqd_set(&desc->
irq_data, irq_settings_get_trigger_mask(desc));
698 irq_put_desc_unlock(desc, flags);
715 for_each_active_irq(irq) {
722 chip = irq_data_get_irq_chip(&desc->
irq_data);
725 !irqd_irq_disabled(&desc->
irq_data)))
745 for_each_active_irq(irq) {
752 chip = irq_data_get_irq_chip(&desc->
irq_data);
755 !irqd_irq_disabled(&desc->
irq_data)))