• Home
  • Raw
  • Download

Lines Matching refs:desc

45 	struct irq_desc *desc = irq_get_desc_lock(irq, &flags, 0);  in irq_set_chip()  local
47 if (!desc) in irq_set_chip()
50 desc->irq_data.chip = (struct irq_chip *)(chip ?: &no_irq_chip); in irq_set_chip()
51 irq_put_desc_unlock(desc, flags); in irq_set_chip()
69 struct irq_desc *desc = irq_get_desc_buslock(irq, &flags, IRQ_GET_DESC_CHECK_GLOBAL); in irq_set_irq_type() local
72 if (!desc) in irq_set_irq_type()
75 ret = __irq_set_trigger(desc, type); in irq_set_irq_type()
76 irq_put_desc_busunlock(desc, flags); in irq_set_irq_type()
91 struct irq_desc *desc = irq_get_desc_lock(irq, &flags, 0); in irq_set_handler_data() local
93 if (!desc) in irq_set_handler_data()
95 desc->irq_common_data.handler_data = data; in irq_set_handler_data()
96 irq_put_desc_unlock(desc, flags); in irq_set_handler_data()
113 …struct irq_desc *desc = irq_get_desc_lock(irq_base + irq_offset, &flags, IRQ_GET_DESC_CHECK_GLOBAL… in irq_set_msi_desc_off() local
115 if (!desc) in irq_set_msi_desc_off()
117 desc->irq_common_data.msi_desc = entry; in irq_set_msi_desc_off()
120 irq_put_desc_unlock(desc, flags); in irq_set_msi_desc_off()
146 struct irq_desc *desc = irq_get_desc_lock(irq, &flags, 0); in irq_set_chip_data() local
148 if (!desc) in irq_set_chip_data()
150 desc->irq_data.chip_data = data; in irq_set_chip_data()
151 irq_put_desc_unlock(desc, flags); in irq_set_chip_data()
158 struct irq_desc *desc = irq_to_desc(irq); in irq_get_irq_data() local
160 return desc ? &desc->irq_data : NULL; in irq_get_irq_data()
164 static void irq_state_clr_disabled(struct irq_desc *desc) in irq_state_clr_disabled() argument
166 irqd_clear(&desc->irq_data, IRQD_IRQ_DISABLED); in irq_state_clr_disabled()
169 static void irq_state_clr_masked(struct irq_desc *desc) in irq_state_clr_masked() argument
171 irqd_clear(&desc->irq_data, IRQD_IRQ_MASKED); in irq_state_clr_masked()
174 static void irq_state_clr_started(struct irq_desc *desc) in irq_state_clr_started() argument
176 irqd_clear(&desc->irq_data, IRQD_IRQ_STARTED); in irq_state_clr_started()
179 static void irq_state_set_started(struct irq_desc *desc) in irq_state_set_started() argument
181 irqd_set(&desc->irq_data, IRQD_IRQ_STARTED); in irq_state_set_started()
192 __irq_startup_managed(struct irq_desc *desc, const struct cpumask *aff, in __irq_startup_managed() argument
195 struct irq_data *d = irq_desc_get_irq_data(desc); in __irq_startup_managed()
229 __irq_startup_managed(struct irq_desc *desc, const struct cpumask *aff, in __irq_startup_managed() argument
236 static int __irq_startup(struct irq_desc *desc) in __irq_startup() argument
238 struct irq_data *d = irq_desc_get_irq_data(desc); in __irq_startup()
246 irq_state_clr_disabled(desc); in __irq_startup()
247 irq_state_clr_masked(desc); in __irq_startup()
249 irq_enable(desc); in __irq_startup()
251 irq_state_set_started(desc); in __irq_startup()
255 int irq_startup(struct irq_desc *desc, bool resend, bool force) in irq_startup() argument
257 struct irq_data *d = irq_desc_get_irq_data(desc); in irq_startup()
261 desc->depth = 0; in irq_startup()
264 irq_enable(desc); in irq_startup()
266 switch (__irq_startup_managed(desc, aff, force)) { in irq_startup()
269 irq_setup_affinity(desc); in irq_startup()
270 ret = __irq_startup(desc); in irq_startup()
272 irq_setup_affinity(desc); in irq_startup()
276 ret = __irq_startup(desc); in irq_startup()
284 check_irq_resend(desc, false); in irq_startup()
289 int irq_activate(struct irq_desc *desc) in irq_activate() argument
291 struct irq_data *d = irq_desc_get_irq_data(desc); in irq_activate()
298 int irq_activate_and_startup(struct irq_desc *desc, bool resend) in irq_activate_and_startup() argument
300 if (WARN_ON(irq_activate(desc))) in irq_activate_and_startup()
302 return irq_startup(desc, resend, IRQ_START_FORCE); in irq_activate_and_startup()
305 static void __irq_disable(struct irq_desc *desc, bool mask);
307 void irq_shutdown(struct irq_desc *desc) in irq_shutdown() argument
309 if (irqd_is_started(&desc->irq_data)) { in irq_shutdown()
310 desc->depth = 1; in irq_shutdown()
311 if (desc->irq_data.chip->irq_shutdown) { in irq_shutdown()
312 desc->irq_data.chip->irq_shutdown(&desc->irq_data); in irq_shutdown()
313 irq_state_set_disabled(desc); in irq_shutdown()
314 irq_state_set_masked(desc); in irq_shutdown()
316 __irq_disable(desc, true); in irq_shutdown()
318 irq_state_clr_started(desc); in irq_shutdown()
323 void irq_shutdown_and_deactivate(struct irq_desc *desc) in irq_shutdown_and_deactivate() argument
325 irq_shutdown(desc); in irq_shutdown_and_deactivate()
332 irq_domain_deactivate_irq(&desc->irq_data); in irq_shutdown_and_deactivate()
335 void irq_enable(struct irq_desc *desc) in irq_enable() argument
337 if (!irqd_irq_disabled(&desc->irq_data)) { in irq_enable()
338 unmask_irq(desc); in irq_enable()
340 irq_state_clr_disabled(desc); in irq_enable()
341 if (desc->irq_data.chip->irq_enable) { in irq_enable()
342 desc->irq_data.chip->irq_enable(&desc->irq_data); in irq_enable()
343 irq_state_clr_masked(desc); in irq_enable()
345 unmask_irq(desc); in irq_enable()
350 static void __irq_disable(struct irq_desc *desc, bool mask) in __irq_disable() argument
352 if (irqd_irq_disabled(&desc->irq_data)) { in __irq_disable()
354 mask_irq(desc); in __irq_disable()
356 irq_state_set_disabled(desc); in __irq_disable()
357 if (desc->irq_data.chip->irq_disable) { in __irq_disable()
358 desc->irq_data.chip->irq_disable(&desc->irq_data); in __irq_disable()
359 irq_state_set_masked(desc); in __irq_disable()
361 mask_irq(desc); in __irq_disable()
386 void irq_disable(struct irq_desc *desc) in irq_disable() argument
388 __irq_disable(desc, irq_settings_disable_unlazy(desc)); in irq_disable()
391 void irq_percpu_enable(struct irq_desc *desc, unsigned int cpu) in irq_percpu_enable() argument
393 if (desc->irq_data.chip->irq_enable) in irq_percpu_enable()
394 desc->irq_data.chip->irq_enable(&desc->irq_data); in irq_percpu_enable()
396 desc->irq_data.chip->irq_unmask(&desc->irq_data); in irq_percpu_enable()
397 cpumask_set_cpu(cpu, desc->percpu_enabled); in irq_percpu_enable()
400 void irq_percpu_disable(struct irq_desc *desc, unsigned int cpu) in irq_percpu_disable() argument
402 if (desc->irq_data.chip->irq_disable) in irq_percpu_disable()
403 desc->irq_data.chip->irq_disable(&desc->irq_data); in irq_percpu_disable()
405 desc->irq_data.chip->irq_mask(&desc->irq_data); in irq_percpu_disable()
406 cpumask_clear_cpu(cpu, desc->percpu_enabled); in irq_percpu_disable()
409 static inline void mask_ack_irq(struct irq_desc *desc) in mask_ack_irq() argument
411 if (desc->irq_data.chip->irq_mask_ack) { in mask_ack_irq()
412 desc->irq_data.chip->irq_mask_ack(&desc->irq_data); in mask_ack_irq()
413 irq_state_set_masked(desc); in mask_ack_irq()
415 mask_irq(desc); in mask_ack_irq()
416 if (desc->irq_data.chip->irq_ack) in mask_ack_irq()
417 desc->irq_data.chip->irq_ack(&desc->irq_data); in mask_ack_irq()
421 void mask_irq(struct irq_desc *desc) in mask_irq() argument
423 if (irqd_irq_masked(&desc->irq_data)) in mask_irq()
426 if (desc->irq_data.chip->irq_mask) { in mask_irq()
427 desc->irq_data.chip->irq_mask(&desc->irq_data); in mask_irq()
428 irq_state_set_masked(desc); in mask_irq()
432 void unmask_irq(struct irq_desc *desc) in unmask_irq() argument
434 if (!irqd_irq_masked(&desc->irq_data)) in unmask_irq()
437 if (desc->irq_data.chip->irq_unmask) { in unmask_irq()
438 desc->irq_data.chip->irq_unmask(&desc->irq_data); in unmask_irq()
439 irq_state_clr_masked(desc); in unmask_irq()
443 void unmask_threaded_irq(struct irq_desc *desc) in unmask_threaded_irq() argument
445 struct irq_chip *chip = desc->irq_data.chip; in unmask_threaded_irq()
448 chip->irq_eoi(&desc->irq_data); in unmask_threaded_irq()
450 unmask_irq(desc); in unmask_threaded_irq()
463 struct irq_desc *desc = irq_to_desc(irq); in handle_nested_irq() local
469 raw_spin_lock_irq(&desc->lock); in handle_nested_irq()
471 desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING); in handle_nested_irq()
473 action = desc->action; in handle_nested_irq()
474 if (unlikely(!action || irqd_irq_disabled(&desc->irq_data))) { in handle_nested_irq()
475 desc->istate |= IRQS_PENDING; in handle_nested_irq()
479 kstat_incr_irqs_this_cpu(desc); in handle_nested_irq()
480 irqd_set(&desc->irq_data, IRQD_IRQ_INPROGRESS); in handle_nested_irq()
481 raw_spin_unlock_irq(&desc->lock); in handle_nested_irq()
484 for_each_action_of_desc(desc, action) in handle_nested_irq()
487 if (!irq_settings_no_debug(desc)) in handle_nested_irq()
488 note_interrupt(desc, action_ret); in handle_nested_irq()
490 raw_spin_lock_irq(&desc->lock); in handle_nested_irq()
491 irqd_clear(&desc->irq_data, IRQD_IRQ_INPROGRESS); in handle_nested_irq()
494 raw_spin_unlock_irq(&desc->lock); in handle_nested_irq()
498 static bool irq_check_poll(struct irq_desc *desc) in irq_check_poll() argument
500 if (!(desc->istate & IRQS_POLL_INPROGRESS)) in irq_check_poll()
502 return irq_wait_for_poll(desc); in irq_check_poll()
505 static bool irq_may_run(struct irq_desc *desc) in irq_may_run() argument
513 if (!irqd_has_set(&desc->irq_data, mask)) { in irq_may_run()
515 if (unlikely(desc->no_suspend_depth && in irq_may_run()
516 irqd_is_wakeup_set(&desc->irq_data))) { in irq_may_run()
517 unsigned int irq = irq_desc_get_irq(desc); in irq_may_run()
520 if (desc->action && desc->action->name) in irq_may_run()
521 name = desc->action->name; in irq_may_run()
535 if (irq_pm_check_wakeup(desc)) in irq_may_run()
541 return irq_check_poll(desc); in irq_may_run()
555 void handle_simple_irq(struct irq_desc *desc) in handle_simple_irq() argument
557 raw_spin_lock(&desc->lock); in handle_simple_irq()
559 if (!irq_may_run(desc)) in handle_simple_irq()
562 desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING); in handle_simple_irq()
564 if (unlikely(!desc->action || irqd_irq_disabled(&desc->irq_data))) { in handle_simple_irq()
565 desc->istate |= IRQS_PENDING; in handle_simple_irq()
569 kstat_incr_irqs_this_cpu(desc); in handle_simple_irq()
570 handle_irq_event(desc); in handle_simple_irq()
573 raw_spin_unlock(&desc->lock); in handle_simple_irq()
590 void handle_untracked_irq(struct irq_desc *desc) in handle_untracked_irq() argument
592 raw_spin_lock(&desc->lock); in handle_untracked_irq()
594 if (!irq_may_run(desc)) in handle_untracked_irq()
597 desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING); in handle_untracked_irq()
599 if (unlikely(!desc->action || irqd_irq_disabled(&desc->irq_data))) { in handle_untracked_irq()
600 desc->istate |= IRQS_PENDING; in handle_untracked_irq()
604 desc->istate &= ~IRQS_PENDING; in handle_untracked_irq()
605 irqd_set(&desc->irq_data, IRQD_IRQ_INPROGRESS); in handle_untracked_irq()
606 raw_spin_unlock(&desc->lock); in handle_untracked_irq()
608 __handle_irq_event_percpu(desc); in handle_untracked_irq()
610 raw_spin_lock(&desc->lock); in handle_untracked_irq()
611 irqd_clear(&desc->irq_data, IRQD_IRQ_INPROGRESS); in handle_untracked_irq()
614 raw_spin_unlock(&desc->lock); in handle_untracked_irq()
622 static void cond_unmask_irq(struct irq_desc *desc) in cond_unmask_irq() argument
631 if (!irqd_irq_disabled(&desc->irq_data) && in cond_unmask_irq()
632 irqd_irq_masked(&desc->irq_data) && !desc->threads_oneshot) in cond_unmask_irq()
633 unmask_irq(desc); in cond_unmask_irq()
645 void handle_level_irq(struct irq_desc *desc) in handle_level_irq() argument
647 raw_spin_lock(&desc->lock); in handle_level_irq()
648 mask_ack_irq(desc); in handle_level_irq()
650 if (!irq_may_run(desc)) in handle_level_irq()
653 desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING); in handle_level_irq()
659 if (unlikely(!desc->action || irqd_irq_disabled(&desc->irq_data))) { in handle_level_irq()
660 desc->istate |= IRQS_PENDING; in handle_level_irq()
664 kstat_incr_irqs_this_cpu(desc); in handle_level_irq()
665 handle_irq_event(desc); in handle_level_irq()
667 cond_unmask_irq(desc); in handle_level_irq()
670 raw_spin_unlock(&desc->lock); in handle_level_irq()
674 static void cond_unmask_eoi_irq(struct irq_desc *desc, struct irq_chip *chip) in cond_unmask_eoi_irq() argument
676 if (!(desc->istate & IRQS_ONESHOT)) { in cond_unmask_eoi_irq()
677 chip->irq_eoi(&desc->irq_data); in cond_unmask_eoi_irq()
686 if (!irqd_irq_disabled(&desc->irq_data) && in cond_unmask_eoi_irq()
687 irqd_irq_masked(&desc->irq_data) && !desc->threads_oneshot) { in cond_unmask_eoi_irq()
688 chip->irq_eoi(&desc->irq_data); in cond_unmask_eoi_irq()
689 unmask_irq(desc); in cond_unmask_eoi_irq()
691 chip->irq_eoi(&desc->irq_data); in cond_unmask_eoi_irq()
704 void handle_fasteoi_irq(struct irq_desc *desc) in handle_fasteoi_irq() argument
706 struct irq_chip *chip = desc->irq_data.chip; in handle_fasteoi_irq()
708 raw_spin_lock(&desc->lock); in handle_fasteoi_irq()
710 if (!irq_may_run(desc)) in handle_fasteoi_irq()
713 desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING); in handle_fasteoi_irq()
719 if (unlikely(!desc->action || irqd_irq_disabled(&desc->irq_data))) { in handle_fasteoi_irq()
720 desc->istate |= IRQS_PENDING; in handle_fasteoi_irq()
721 mask_irq(desc); in handle_fasteoi_irq()
725 kstat_incr_irqs_this_cpu(desc); in handle_fasteoi_irq()
726 if (desc->istate & IRQS_ONESHOT) in handle_fasteoi_irq()
727 mask_irq(desc); in handle_fasteoi_irq()
729 handle_irq_event(desc); in handle_fasteoi_irq()
731 cond_unmask_eoi_irq(desc, chip); in handle_fasteoi_irq()
733 raw_spin_unlock(&desc->lock); in handle_fasteoi_irq()
737 chip->irq_eoi(&desc->irq_data); in handle_fasteoi_irq()
738 raw_spin_unlock(&desc->lock); in handle_fasteoi_irq()
754 void handle_fasteoi_nmi(struct irq_desc *desc) in handle_fasteoi_nmi() argument
756 struct irq_chip *chip = irq_desc_get_chip(desc); in handle_fasteoi_nmi()
757 struct irqaction *action = desc->action; in handle_fasteoi_nmi()
758 unsigned int irq = irq_desc_get_irq(desc); in handle_fasteoi_nmi()
761 __kstat_incr_irqs_this_cpu(desc); in handle_fasteoi_nmi()
771 chip->irq_eoi(&desc->irq_data); in handle_fasteoi_nmi()
790 void handle_edge_irq(struct irq_desc *desc) in handle_edge_irq() argument
792 raw_spin_lock(&desc->lock); in handle_edge_irq()
794 desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING); in handle_edge_irq()
796 if (!irq_may_run(desc)) { in handle_edge_irq()
797 desc->istate |= IRQS_PENDING; in handle_edge_irq()
798 mask_ack_irq(desc); in handle_edge_irq()
806 if (irqd_irq_disabled(&desc->irq_data) || !desc->action) { in handle_edge_irq()
807 desc->istate |= IRQS_PENDING; in handle_edge_irq()
808 mask_ack_irq(desc); in handle_edge_irq()
812 kstat_incr_irqs_this_cpu(desc); in handle_edge_irq()
815 desc->irq_data.chip->irq_ack(&desc->irq_data); in handle_edge_irq()
818 if (unlikely(!desc->action)) { in handle_edge_irq()
819 mask_irq(desc); in handle_edge_irq()
828 if (unlikely(desc->istate & IRQS_PENDING)) { in handle_edge_irq()
829 if (!irqd_irq_disabled(&desc->irq_data) && in handle_edge_irq()
830 irqd_irq_masked(&desc->irq_data)) in handle_edge_irq()
831 unmask_irq(desc); in handle_edge_irq()
834 handle_irq_event(desc); in handle_edge_irq()
836 } while ((desc->istate & IRQS_PENDING) && in handle_edge_irq()
837 !irqd_irq_disabled(&desc->irq_data)); in handle_edge_irq()
840 raw_spin_unlock(&desc->lock); in handle_edge_irq()
852 void handle_edge_eoi_irq(struct irq_desc *desc) in handle_edge_eoi_irq() argument
854 struct irq_chip *chip = irq_desc_get_chip(desc); in handle_edge_eoi_irq()
856 raw_spin_lock(&desc->lock); in handle_edge_eoi_irq()
858 desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING); in handle_edge_eoi_irq()
860 if (!irq_may_run(desc)) { in handle_edge_eoi_irq()
861 desc->istate |= IRQS_PENDING; in handle_edge_eoi_irq()
869 if (irqd_irq_disabled(&desc->irq_data) || !desc->action) { in handle_edge_eoi_irq()
870 desc->istate |= IRQS_PENDING; in handle_edge_eoi_irq()
874 kstat_incr_irqs_this_cpu(desc); in handle_edge_eoi_irq()
877 if (unlikely(!desc->action)) in handle_edge_eoi_irq()
880 handle_irq_event(desc); in handle_edge_eoi_irq()
882 } while ((desc->istate & IRQS_PENDING) && in handle_edge_eoi_irq()
883 !irqd_irq_disabled(&desc->irq_data)); in handle_edge_eoi_irq()
886 chip->irq_eoi(&desc->irq_data); in handle_edge_eoi_irq()
887 raw_spin_unlock(&desc->lock); in handle_edge_eoi_irq()
897 void handle_percpu_irq(struct irq_desc *desc) in handle_percpu_irq() argument
899 struct irq_chip *chip = irq_desc_get_chip(desc); in handle_percpu_irq()
905 __kstat_incr_irqs_this_cpu(desc); in handle_percpu_irq()
908 chip->irq_ack(&desc->irq_data); in handle_percpu_irq()
910 handle_irq_event_percpu(desc); in handle_percpu_irq()
913 chip->irq_eoi(&desc->irq_data); in handle_percpu_irq()
927 void handle_percpu_devid_irq(struct irq_desc *desc) in handle_percpu_devid_irq() argument
929 struct irq_chip *chip = irq_desc_get_chip(desc); in handle_percpu_devid_irq()
930 struct irqaction *action = desc->action; in handle_percpu_devid_irq()
931 unsigned int irq = irq_desc_get_irq(desc); in handle_percpu_devid_irq()
938 __kstat_incr_irqs_this_cpu(desc); in handle_percpu_devid_irq()
941 chip->irq_ack(&desc->irq_data); in handle_percpu_devid_irq()
949 bool enabled = cpumask_test_cpu(cpu, desc->percpu_enabled); in handle_percpu_devid_irq()
952 irq_percpu_disable(desc, cpu); in handle_percpu_devid_irq()
959 chip->irq_eoi(&desc->irq_data); in handle_percpu_devid_irq()
970 void handle_percpu_devid_fasteoi_nmi(struct irq_desc *desc) in handle_percpu_devid_fasteoi_nmi() argument
972 struct irq_chip *chip = irq_desc_get_chip(desc); in handle_percpu_devid_fasteoi_nmi()
973 struct irqaction *action = desc->action; in handle_percpu_devid_fasteoi_nmi()
974 unsigned int irq = irq_desc_get_irq(desc); in handle_percpu_devid_fasteoi_nmi()
977 __kstat_incr_irqs_this_cpu(desc); in handle_percpu_devid_fasteoi_nmi()
984 chip->irq_eoi(&desc->irq_data); in handle_percpu_devid_fasteoi_nmi()
988 __irq_do_set_handler(struct irq_desc *desc, irq_flow_handler_t handle, in __irq_do_set_handler() argument
994 struct irq_data *irq_data = &desc->irq_data; in __irq_do_set_handler()
1023 if (desc->irq_data.chip != &no_irq_chip) in __irq_do_set_handler()
1024 mask_ack_irq(desc); in __irq_do_set_handler()
1025 irq_state_set_disabled(desc); in __irq_do_set_handler()
1027 desc->action = NULL; in __irq_do_set_handler()
1028 WARN_ON(irq_chip_pm_put(irq_desc_get_irq_data(desc))); in __irq_do_set_handler()
1030 desc->depth = 1; in __irq_do_set_handler()
1032 desc->handle_irq = handle; in __irq_do_set_handler()
1033 desc->name = name; in __irq_do_set_handler()
1036 unsigned int type = irqd_get_trigger_type(&desc->irq_data); in __irq_do_set_handler()
1047 __irq_set_trigger(desc, type); in __irq_do_set_handler()
1048 desc->handle_irq = handle; in __irq_do_set_handler()
1051 irq_settings_set_noprobe(desc); in __irq_do_set_handler()
1052 irq_settings_set_norequest(desc); in __irq_do_set_handler()
1053 irq_settings_set_nothread(desc); in __irq_do_set_handler()
1054 desc->action = &chained_action; in __irq_do_set_handler()
1055 WARN_ON(irq_chip_pm_get(irq_desc_get_irq_data(desc))); in __irq_do_set_handler()
1056 irq_activate_and_startup(desc, IRQ_RESEND); in __irq_do_set_handler()
1065 struct irq_desc *desc = irq_get_desc_buslock(irq, &flags, 0); in __irq_set_handler() local
1067 if (!desc) in __irq_set_handler()
1070 __irq_do_set_handler(desc, handle, is_chained, name); in __irq_set_handler()
1071 irq_put_desc_busunlock(desc, flags); in __irq_set_handler()
1080 struct irq_desc *desc = irq_get_desc_buslock(irq, &flags, 0); in irq_set_chained_handler_and_data() local
1082 if (!desc) in irq_set_chained_handler_and_data()
1085 desc->irq_common_data.handler_data = data; in irq_set_chained_handler_and_data()
1086 __irq_do_set_handler(desc, handle, 1, NULL); in irq_set_chained_handler_and_data()
1088 irq_put_desc_busunlock(desc, flags); in irq_set_chained_handler_and_data()
1104 struct irq_desc *desc = irq_get_desc_lock(irq, &flags, 0); in irq_modify_status() local
1106 if (!desc) in irq_modify_status()
1113 WARN_ON_ONCE(!desc->depth && (set & _IRQ_NOAUTOEN)); in irq_modify_status()
1115 irq_settings_clr_and_set(desc, clr, set); in irq_modify_status()
1117 trigger = irqd_get_trigger_type(&desc->irq_data); in irq_modify_status()
1119 irqd_clear(&desc->irq_data, IRQD_NO_BALANCING | IRQD_PER_CPU | in irq_modify_status()
1121 if (irq_settings_has_no_balance_set(desc)) in irq_modify_status()
1122 irqd_set(&desc->irq_data, IRQD_NO_BALANCING); in irq_modify_status()
1123 if (irq_settings_is_per_cpu(desc)) in irq_modify_status()
1124 irqd_set(&desc->irq_data, IRQD_PER_CPU); in irq_modify_status()
1125 if (irq_settings_can_move_pcntxt(desc)) in irq_modify_status()
1126 irqd_set(&desc->irq_data, IRQD_MOVE_PCNTXT); in irq_modify_status()
1127 if (irq_settings_is_level(desc)) in irq_modify_status()
1128 irqd_set(&desc->irq_data, IRQD_LEVEL); in irq_modify_status()
1130 tmp = irq_settings_get_trigger_mask(desc); in irq_modify_status()
1134 irqd_set(&desc->irq_data, trigger); in irq_modify_status()
1136 irq_put_desc_unlock(desc, flags); in irq_modify_status()
1149 struct irq_desc *desc; in irq_cpu_online() local
1155 desc = irq_to_desc(irq); in irq_cpu_online()
1156 if (!desc) in irq_cpu_online()
1159 raw_spin_lock_irqsave(&desc->lock, flags); in irq_cpu_online()
1161 chip = irq_data_get_irq_chip(&desc->irq_data); in irq_cpu_online()
1164 !irqd_irq_disabled(&desc->irq_data))) in irq_cpu_online()
1165 chip->irq_cpu_online(&desc->irq_data); in irq_cpu_online()
1167 raw_spin_unlock_irqrestore(&desc->lock, flags); in irq_cpu_online()
1179 struct irq_desc *desc; in irq_cpu_offline() local
1185 desc = irq_to_desc(irq); in irq_cpu_offline()
1186 if (!desc) in irq_cpu_offline()
1189 raw_spin_lock_irqsave(&desc->lock, flags); in irq_cpu_offline()
1191 chip = irq_data_get_irq_chip(&desc->irq_data); in irq_cpu_offline()
1194 !irqd_irq_disabled(&desc->irq_data))) in irq_cpu_offline()
1195 chip->irq_cpu_offline(&desc->irq_data); in irq_cpu_offline()
1197 raw_spin_unlock_irqrestore(&desc->lock, flags); in irq_cpu_offline()
1215 void handle_fasteoi_ack_irq(struct irq_desc *desc) in handle_fasteoi_ack_irq() argument
1217 struct irq_chip *chip = desc->irq_data.chip; in handle_fasteoi_ack_irq()
1219 raw_spin_lock(&desc->lock); in handle_fasteoi_ack_irq()
1221 if (!irq_may_run(desc)) in handle_fasteoi_ack_irq()
1224 desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING); in handle_fasteoi_ack_irq()
1230 if (unlikely(!desc->action || irqd_irq_disabled(&desc->irq_data))) { in handle_fasteoi_ack_irq()
1231 desc->istate |= IRQS_PENDING; in handle_fasteoi_ack_irq()
1232 mask_irq(desc); in handle_fasteoi_ack_irq()
1236 kstat_incr_irqs_this_cpu(desc); in handle_fasteoi_ack_irq()
1237 if (desc->istate & IRQS_ONESHOT) in handle_fasteoi_ack_irq()
1238 mask_irq(desc); in handle_fasteoi_ack_irq()
1241 desc->irq_data.chip->irq_ack(&desc->irq_data); in handle_fasteoi_ack_irq()
1243 handle_irq_event(desc); in handle_fasteoi_ack_irq()
1245 cond_unmask_eoi_irq(desc, chip); in handle_fasteoi_ack_irq()
1247 raw_spin_unlock(&desc->lock); in handle_fasteoi_ack_irq()
1251 chip->irq_eoi(&desc->irq_data); in handle_fasteoi_ack_irq()
1252 raw_spin_unlock(&desc->lock); in handle_fasteoi_ack_irq()
1266 void handle_fasteoi_mask_irq(struct irq_desc *desc) in handle_fasteoi_mask_irq() argument
1268 struct irq_chip *chip = desc->irq_data.chip; in handle_fasteoi_mask_irq()
1270 raw_spin_lock(&desc->lock); in handle_fasteoi_mask_irq()
1271 mask_ack_irq(desc); in handle_fasteoi_mask_irq()
1273 if (!irq_may_run(desc)) in handle_fasteoi_mask_irq()
1276 desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING); in handle_fasteoi_mask_irq()
1282 if (unlikely(!desc->action || irqd_irq_disabled(&desc->irq_data))) { in handle_fasteoi_mask_irq()
1283 desc->istate |= IRQS_PENDING; in handle_fasteoi_mask_irq()
1284 mask_irq(desc); in handle_fasteoi_mask_irq()
1288 kstat_incr_irqs_this_cpu(desc); in handle_fasteoi_mask_irq()
1289 if (desc->istate & IRQS_ONESHOT) in handle_fasteoi_mask_irq()
1290 mask_irq(desc); in handle_fasteoi_mask_irq()
1292 handle_irq_event(desc); in handle_fasteoi_mask_irq()
1294 cond_unmask_eoi_irq(desc, chip); in handle_fasteoi_mask_irq()
1296 raw_spin_unlock(&desc->lock); in handle_fasteoi_mask_irq()
1300 chip->irq_eoi(&desc->irq_data); in handle_fasteoi_mask_irq()
1301 raw_spin_unlock(&desc->lock); in handle_fasteoi_mask_irq()