• Home
  • Raw
  • Download

Lines Matching refs:desc

44 	struct irq_desc *desc = irq_get_desc_lock(irq, &flags, 0);  in irq_set_chip()  local
46 if (!desc) in irq_set_chip()
52 desc->irq_data.chip = chip; in irq_set_chip()
53 irq_put_desc_unlock(desc, flags); in irq_set_chip()
71 struct irq_desc *desc = irq_get_desc_buslock(irq, &flags, IRQ_GET_DESC_CHECK_GLOBAL); in irq_set_irq_type() local
74 if (!desc) in irq_set_irq_type()
77 ret = __irq_set_trigger(desc, type); in irq_set_irq_type()
78 irq_put_desc_busunlock(desc, flags); in irq_set_irq_type()
93 struct irq_desc *desc = irq_get_desc_lock(irq, &flags, 0); in irq_set_handler_data() local
95 if (!desc) in irq_set_handler_data()
97 desc->irq_common_data.handler_data = data; in irq_set_handler_data()
98 irq_put_desc_unlock(desc, flags); in irq_set_handler_data()
115 …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
117 if (!desc) in irq_set_msi_desc_off()
119 desc->irq_common_data.msi_desc = entry; in irq_set_msi_desc_off()
122 irq_put_desc_unlock(desc, flags); in irq_set_msi_desc_off()
148 struct irq_desc *desc = irq_get_desc_lock(irq, &flags, 0); in irq_set_chip_data() local
150 if (!desc) in irq_set_chip_data()
152 desc->irq_data.chip_data = data; in irq_set_chip_data()
153 irq_put_desc_unlock(desc, flags); in irq_set_chip_data()
160 struct irq_desc *desc = irq_to_desc(irq); in irq_get_irq_data() local
162 return desc ? &desc->irq_data : NULL; in irq_get_irq_data()
166 static void irq_state_clr_disabled(struct irq_desc *desc) in irq_state_clr_disabled() argument
168 irqd_clear(&desc->irq_data, IRQD_IRQ_DISABLED); in irq_state_clr_disabled()
171 static void irq_state_clr_masked(struct irq_desc *desc) in irq_state_clr_masked() argument
173 irqd_clear(&desc->irq_data, IRQD_IRQ_MASKED); in irq_state_clr_masked()
176 static void irq_state_clr_started(struct irq_desc *desc) in irq_state_clr_started() argument
178 irqd_clear(&desc->irq_data, IRQD_IRQ_STARTED); in irq_state_clr_started()
181 static void irq_state_set_started(struct irq_desc *desc) in irq_state_set_started() argument
183 irqd_set(&desc->irq_data, IRQD_IRQ_STARTED); in irq_state_set_started()
194 __irq_startup_managed(struct irq_desc *desc, struct cpumask *aff, bool force) in __irq_startup_managed() argument
196 struct irq_data *d = irq_desc_get_irq_data(desc); in __irq_startup_managed()
230 __irq_startup_managed(struct irq_desc *desc, struct cpumask *aff, bool force) 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()
268 ret = __irq_startup(desc); in irq_startup()
269 irq_setup_affinity(desc); in irq_startup()
273 ret = __irq_startup(desc); in irq_startup()
281 check_irq_resend(desc); in irq_startup()
286 int irq_activate(struct irq_desc *desc) in irq_activate() argument
288 struct irq_data *d = irq_desc_get_irq_data(desc); in irq_activate()
295 int irq_activate_and_startup(struct irq_desc *desc, bool resend) in irq_activate_and_startup() argument
297 if (WARN_ON(irq_activate(desc))) in irq_activate_and_startup()
299 return irq_startup(desc, resend, IRQ_START_FORCE); in irq_activate_and_startup()
302 static void __irq_disable(struct irq_desc *desc, bool mask);
304 void irq_shutdown(struct irq_desc *desc) in irq_shutdown() argument
306 if (irqd_is_started(&desc->irq_data)) { in irq_shutdown()
307 desc->depth = 1; in irq_shutdown()
308 if (desc->irq_data.chip->irq_shutdown) { in irq_shutdown()
309 desc->irq_data.chip->irq_shutdown(&desc->irq_data); in irq_shutdown()
310 irq_state_set_disabled(desc); in irq_shutdown()
311 irq_state_set_masked(desc); in irq_shutdown()
313 __irq_disable(desc, true); in irq_shutdown()
315 irq_state_clr_started(desc); in irq_shutdown()
320 void irq_shutdown_and_deactivate(struct irq_desc *desc) in irq_shutdown_and_deactivate() argument
322 irq_shutdown(desc); in irq_shutdown_and_deactivate()
329 irq_domain_deactivate_irq(&desc->irq_data); in irq_shutdown_and_deactivate()
332 void irq_enable(struct irq_desc *desc) in irq_enable() argument
334 if (!irqd_irq_disabled(&desc->irq_data)) { in irq_enable()
335 unmask_irq(desc); in irq_enable()
337 irq_state_clr_disabled(desc); in irq_enable()
338 if (desc->irq_data.chip->irq_enable) { in irq_enable()
339 desc->irq_data.chip->irq_enable(&desc->irq_data); in irq_enable()
340 irq_state_clr_masked(desc); in irq_enable()
342 unmask_irq(desc); in irq_enable()
347 static void __irq_disable(struct irq_desc *desc, bool mask) in __irq_disable() argument
349 if (irqd_irq_disabled(&desc->irq_data)) { in __irq_disable()
351 mask_irq(desc); in __irq_disable()
353 irq_state_set_disabled(desc); in __irq_disable()
354 if (desc->irq_data.chip->irq_disable) { in __irq_disable()
355 desc->irq_data.chip->irq_disable(&desc->irq_data); in __irq_disable()
356 irq_state_set_masked(desc); in __irq_disable()
358 mask_irq(desc); in __irq_disable()
383 void irq_disable(struct irq_desc *desc) in irq_disable() argument
385 __irq_disable(desc, irq_settings_disable_unlazy(desc)); in irq_disable()
388 void irq_percpu_enable(struct irq_desc *desc, unsigned int cpu) in irq_percpu_enable() argument
390 if (desc->irq_data.chip->irq_enable) in irq_percpu_enable()
391 desc->irq_data.chip->irq_enable(&desc->irq_data); in irq_percpu_enable()
393 desc->irq_data.chip->irq_unmask(&desc->irq_data); in irq_percpu_enable()
394 cpumask_set_cpu(cpu, desc->percpu_enabled); in irq_percpu_enable()
397 void irq_percpu_disable(struct irq_desc *desc, unsigned int cpu) in irq_percpu_disable() argument
399 if (desc->irq_data.chip->irq_disable) in irq_percpu_disable()
400 desc->irq_data.chip->irq_disable(&desc->irq_data); in irq_percpu_disable()
402 desc->irq_data.chip->irq_mask(&desc->irq_data); in irq_percpu_disable()
403 cpumask_clear_cpu(cpu, desc->percpu_enabled); in irq_percpu_disable()
406 static inline void mask_ack_irq(struct irq_desc *desc) in mask_ack_irq() argument
408 if (desc->irq_data.chip->irq_mask_ack) { in mask_ack_irq()
409 desc->irq_data.chip->irq_mask_ack(&desc->irq_data); in mask_ack_irq()
410 irq_state_set_masked(desc); in mask_ack_irq()
412 mask_irq(desc); in mask_ack_irq()
413 if (desc->irq_data.chip->irq_ack) in mask_ack_irq()
414 desc->irq_data.chip->irq_ack(&desc->irq_data); in mask_ack_irq()
418 void mask_irq(struct irq_desc *desc) in mask_irq() argument
420 if (irqd_irq_masked(&desc->irq_data)) in mask_irq()
423 if (desc->irq_data.chip->irq_mask) { in mask_irq()
424 desc->irq_data.chip->irq_mask(&desc->irq_data); in mask_irq()
425 irq_state_set_masked(desc); in mask_irq()
429 void unmask_irq(struct irq_desc *desc) in unmask_irq() argument
431 if (!irqd_irq_masked(&desc->irq_data)) in unmask_irq()
434 if (desc->irq_data.chip->irq_unmask) { in unmask_irq()
435 desc->irq_data.chip->irq_unmask(&desc->irq_data); in unmask_irq()
436 irq_state_clr_masked(desc); in unmask_irq()
440 void unmask_threaded_irq(struct irq_desc *desc) in unmask_threaded_irq() argument
442 struct irq_chip *chip = desc->irq_data.chip; in unmask_threaded_irq()
445 chip->irq_eoi(&desc->irq_data); in unmask_threaded_irq()
447 unmask_irq(desc); in unmask_threaded_irq()
460 struct irq_desc *desc = irq_to_desc(irq); in handle_nested_irq() local
466 raw_spin_lock_irq(&desc->lock); in handle_nested_irq()
468 desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING); in handle_nested_irq()
470 action = desc->action; in handle_nested_irq()
471 if (unlikely(!action || irqd_irq_disabled(&desc->irq_data))) { in handle_nested_irq()
472 desc->istate |= IRQS_PENDING; in handle_nested_irq()
476 kstat_incr_irqs_this_cpu(desc); in handle_nested_irq()
477 irqd_set(&desc->irq_data, IRQD_IRQ_INPROGRESS); in handle_nested_irq()
478 raw_spin_unlock_irq(&desc->lock); in handle_nested_irq()
481 for_each_action_of_desc(desc, action) in handle_nested_irq()
485 note_interrupt(desc, action_ret); in handle_nested_irq()
487 raw_spin_lock_irq(&desc->lock); in handle_nested_irq()
488 irqd_clear(&desc->irq_data, IRQD_IRQ_INPROGRESS); in handle_nested_irq()
491 raw_spin_unlock_irq(&desc->lock); in handle_nested_irq()
495 static bool irq_check_poll(struct irq_desc *desc) in irq_check_poll() argument
497 if (!(desc->istate & IRQS_POLL_INPROGRESS)) in irq_check_poll()
499 return irq_wait_for_poll(desc); in irq_check_poll()
502 static bool irq_may_run(struct irq_desc *desc) in irq_may_run() argument
510 if (!irqd_has_set(&desc->irq_data, mask)) in irq_may_run()
518 if (irq_pm_check_wakeup(desc)) in irq_may_run()
524 return irq_check_poll(desc); in irq_may_run()
538 void handle_simple_irq(struct irq_desc *desc) in handle_simple_irq() argument
540 raw_spin_lock(&desc->lock); in handle_simple_irq()
542 if (!irq_may_run(desc)) in handle_simple_irq()
545 desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING); in handle_simple_irq()
547 if (unlikely(!desc->action || irqd_irq_disabled(&desc->irq_data))) { in handle_simple_irq()
548 desc->istate |= IRQS_PENDING; in handle_simple_irq()
552 kstat_incr_irqs_this_cpu(desc); in handle_simple_irq()
553 handle_irq_event(desc); in handle_simple_irq()
556 raw_spin_unlock(&desc->lock); in handle_simple_irq()
573 void handle_untracked_irq(struct irq_desc *desc) in handle_untracked_irq() argument
577 raw_spin_lock(&desc->lock); in handle_untracked_irq()
579 if (!irq_may_run(desc)) in handle_untracked_irq()
582 desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING); in handle_untracked_irq()
584 if (unlikely(!desc->action || irqd_irq_disabled(&desc->irq_data))) { in handle_untracked_irq()
585 desc->istate |= IRQS_PENDING; in handle_untracked_irq()
589 desc->istate &= ~IRQS_PENDING; in handle_untracked_irq()
590 irqd_set(&desc->irq_data, IRQD_IRQ_INPROGRESS); in handle_untracked_irq()
591 raw_spin_unlock(&desc->lock); in handle_untracked_irq()
593 __handle_irq_event_percpu(desc, &flags); in handle_untracked_irq()
595 raw_spin_lock(&desc->lock); in handle_untracked_irq()
596 irqd_clear(&desc->irq_data, IRQD_IRQ_INPROGRESS); in handle_untracked_irq()
599 raw_spin_unlock(&desc->lock); in handle_untracked_irq()
607 static void cond_unmask_irq(struct irq_desc *desc) in cond_unmask_irq() argument
616 if (!irqd_irq_disabled(&desc->irq_data) && in cond_unmask_irq()
617 irqd_irq_masked(&desc->irq_data) && !desc->threads_oneshot) in cond_unmask_irq()
618 unmask_irq(desc); in cond_unmask_irq()
630 void handle_level_irq(struct irq_desc *desc) in handle_level_irq() argument
632 raw_spin_lock(&desc->lock); in handle_level_irq()
633 mask_ack_irq(desc); in handle_level_irq()
635 if (!irq_may_run(desc)) in handle_level_irq()
638 desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING); in handle_level_irq()
644 if (unlikely(!desc->action || irqd_irq_disabled(&desc->irq_data))) { in handle_level_irq()
645 desc->istate |= IRQS_PENDING; in handle_level_irq()
649 kstat_incr_irqs_this_cpu(desc); in handle_level_irq()
650 handle_irq_event(desc); in handle_level_irq()
652 cond_unmask_irq(desc); in handle_level_irq()
655 raw_spin_unlock(&desc->lock); in handle_level_irq()
660 static inline void preflow_handler(struct irq_desc *desc) in preflow_handler() argument
662 if (desc->preflow_handler) in preflow_handler()
663 desc->preflow_handler(&desc->irq_data); in preflow_handler()
666 static inline void preflow_handler(struct irq_desc *desc) { } in preflow_handler() argument
669 static void cond_unmask_eoi_irq(struct irq_desc *desc, struct irq_chip *chip) in cond_unmask_eoi_irq() argument
671 if (!(desc->istate & IRQS_ONESHOT)) { in cond_unmask_eoi_irq()
672 chip->irq_eoi(&desc->irq_data); in cond_unmask_eoi_irq()
681 if (!irqd_irq_disabled(&desc->irq_data) && in cond_unmask_eoi_irq()
682 irqd_irq_masked(&desc->irq_data) && !desc->threads_oneshot) { in cond_unmask_eoi_irq()
683 chip->irq_eoi(&desc->irq_data); in cond_unmask_eoi_irq()
684 unmask_irq(desc); in cond_unmask_eoi_irq()
686 chip->irq_eoi(&desc->irq_data); in cond_unmask_eoi_irq()
699 void handle_fasteoi_irq(struct irq_desc *desc) in handle_fasteoi_irq() argument
701 struct irq_chip *chip = desc->irq_data.chip; in handle_fasteoi_irq()
703 raw_spin_lock(&desc->lock); in handle_fasteoi_irq()
705 if (!irq_may_run(desc)) in handle_fasteoi_irq()
708 desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING); in handle_fasteoi_irq()
714 if (unlikely(!desc->action || irqd_irq_disabled(&desc->irq_data))) { in handle_fasteoi_irq()
715 desc->istate |= IRQS_PENDING; in handle_fasteoi_irq()
716 mask_irq(desc); in handle_fasteoi_irq()
720 kstat_incr_irqs_this_cpu(desc); in handle_fasteoi_irq()
721 if (desc->istate & IRQS_ONESHOT) in handle_fasteoi_irq()
722 mask_irq(desc); in handle_fasteoi_irq()
724 preflow_handler(desc); in handle_fasteoi_irq()
725 handle_irq_event(desc); in handle_fasteoi_irq()
727 cond_unmask_eoi_irq(desc, chip); in handle_fasteoi_irq()
729 raw_spin_unlock(&desc->lock); in handle_fasteoi_irq()
733 chip->irq_eoi(&desc->irq_data); in handle_fasteoi_irq()
734 raw_spin_unlock(&desc->lock); in handle_fasteoi_irq()
750 void handle_fasteoi_nmi(struct irq_desc *desc) in handle_fasteoi_nmi() argument
752 struct irq_chip *chip = irq_desc_get_chip(desc); in handle_fasteoi_nmi()
753 struct irqaction *action = desc->action; in handle_fasteoi_nmi()
754 unsigned int irq = irq_desc_get_irq(desc); in handle_fasteoi_nmi()
757 __kstat_incr_irqs_this_cpu(desc); in handle_fasteoi_nmi()
767 chip->irq_eoi(&desc->irq_data); in handle_fasteoi_nmi()
786 void handle_edge_irq(struct irq_desc *desc) in handle_edge_irq() argument
788 raw_spin_lock(&desc->lock); in handle_edge_irq()
790 desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING); in handle_edge_irq()
792 if (!irq_may_run(desc)) { in handle_edge_irq()
793 desc->istate |= IRQS_PENDING; in handle_edge_irq()
794 mask_ack_irq(desc); in handle_edge_irq()
802 if (irqd_irq_disabled(&desc->irq_data) || !desc->action) { in handle_edge_irq()
803 desc->istate |= IRQS_PENDING; in handle_edge_irq()
804 mask_ack_irq(desc); in handle_edge_irq()
808 kstat_incr_irqs_this_cpu(desc); in handle_edge_irq()
811 desc->irq_data.chip->irq_ack(&desc->irq_data); in handle_edge_irq()
814 if (unlikely(!desc->action)) { in handle_edge_irq()
815 mask_irq(desc); in handle_edge_irq()
824 if (unlikely(desc->istate & IRQS_PENDING)) { in handle_edge_irq()
825 if (!irqd_irq_disabled(&desc->irq_data) && in handle_edge_irq()
826 irqd_irq_masked(&desc->irq_data)) in handle_edge_irq()
827 unmask_irq(desc); in handle_edge_irq()
830 handle_irq_event(desc); in handle_edge_irq()
832 } while ((desc->istate & IRQS_PENDING) && in handle_edge_irq()
833 !irqd_irq_disabled(&desc->irq_data)); in handle_edge_irq()
836 raw_spin_unlock(&desc->lock); in handle_edge_irq()
848 void handle_edge_eoi_irq(struct irq_desc *desc) in handle_edge_eoi_irq() argument
850 struct irq_chip *chip = irq_desc_get_chip(desc); in handle_edge_eoi_irq()
852 raw_spin_lock(&desc->lock); in handle_edge_eoi_irq()
854 desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING); in handle_edge_eoi_irq()
856 if (!irq_may_run(desc)) { in handle_edge_eoi_irq()
857 desc->istate |= IRQS_PENDING; in handle_edge_eoi_irq()
865 if (irqd_irq_disabled(&desc->irq_data) || !desc->action) { in handle_edge_eoi_irq()
866 desc->istate |= IRQS_PENDING; in handle_edge_eoi_irq()
870 kstat_incr_irqs_this_cpu(desc); in handle_edge_eoi_irq()
873 if (unlikely(!desc->action)) in handle_edge_eoi_irq()
876 handle_irq_event(desc); in handle_edge_eoi_irq()
878 } while ((desc->istate & IRQS_PENDING) && in handle_edge_eoi_irq()
879 !irqd_irq_disabled(&desc->irq_data)); in handle_edge_eoi_irq()
882 chip->irq_eoi(&desc->irq_data); in handle_edge_eoi_irq()
883 raw_spin_unlock(&desc->lock); in handle_edge_eoi_irq()
893 void handle_percpu_irq(struct irq_desc *desc) in handle_percpu_irq() argument
895 struct irq_chip *chip = irq_desc_get_chip(desc); in handle_percpu_irq()
901 __kstat_incr_irqs_this_cpu(desc); in handle_percpu_irq()
904 chip->irq_ack(&desc->irq_data); in handle_percpu_irq()
906 handle_irq_event_percpu(desc); in handle_percpu_irq()
909 chip->irq_eoi(&desc->irq_data); in handle_percpu_irq()
923 void handle_percpu_devid_irq(struct irq_desc *desc) in handle_percpu_devid_irq() argument
925 struct irq_chip *chip = irq_desc_get_chip(desc); in handle_percpu_devid_irq()
926 struct irqaction *action = desc->action; in handle_percpu_devid_irq()
927 unsigned int irq = irq_desc_get_irq(desc); in handle_percpu_devid_irq()
934 __kstat_incr_irqs_this_cpu(desc); in handle_percpu_devid_irq()
937 chip->irq_ack(&desc->irq_data); in handle_percpu_devid_irq()
945 bool enabled = cpumask_test_cpu(cpu, desc->percpu_enabled); in handle_percpu_devid_irq()
948 irq_percpu_disable(desc, cpu); in handle_percpu_devid_irq()
955 chip->irq_eoi(&desc->irq_data); in handle_percpu_devid_irq()
966 void handle_percpu_devid_fasteoi_nmi(struct irq_desc *desc) in handle_percpu_devid_fasteoi_nmi() argument
968 struct irq_chip *chip = irq_desc_get_chip(desc); in handle_percpu_devid_fasteoi_nmi()
969 struct irqaction *action = desc->action; in handle_percpu_devid_fasteoi_nmi()
970 unsigned int irq = irq_desc_get_irq(desc); in handle_percpu_devid_fasteoi_nmi()
973 __kstat_incr_irqs_this_cpu(desc); in handle_percpu_devid_fasteoi_nmi()
980 chip->irq_eoi(&desc->irq_data); in handle_percpu_devid_fasteoi_nmi()
984 __irq_do_set_handler(struct irq_desc *desc, irq_flow_handler_t handle, in __irq_do_set_handler() argument
990 struct irq_data *irq_data = &desc->irq_data; in __irq_do_set_handler()
1019 if (desc->irq_data.chip != &no_irq_chip) in __irq_do_set_handler()
1020 mask_ack_irq(desc); in __irq_do_set_handler()
1021 irq_state_set_disabled(desc); in __irq_do_set_handler()
1023 desc->action = NULL; in __irq_do_set_handler()
1024 desc->depth = 1; in __irq_do_set_handler()
1026 desc->handle_irq = handle; in __irq_do_set_handler()
1027 desc->name = name; in __irq_do_set_handler()
1030 unsigned int type = irqd_get_trigger_type(&desc->irq_data); in __irq_do_set_handler()
1041 __irq_set_trigger(desc, type); in __irq_do_set_handler()
1042 desc->handle_irq = handle; in __irq_do_set_handler()
1045 irq_settings_set_noprobe(desc); in __irq_do_set_handler()
1046 irq_settings_set_norequest(desc); in __irq_do_set_handler()
1047 irq_settings_set_nothread(desc); in __irq_do_set_handler()
1048 desc->action = &chained_action; in __irq_do_set_handler()
1049 irq_activate_and_startup(desc, IRQ_RESEND); in __irq_do_set_handler()
1058 struct irq_desc *desc = irq_get_desc_buslock(irq, &flags, 0); in __irq_set_handler() local
1060 if (!desc) in __irq_set_handler()
1063 __irq_do_set_handler(desc, handle, is_chained, name); in __irq_set_handler()
1064 irq_put_desc_busunlock(desc, flags); in __irq_set_handler()
1073 struct irq_desc *desc = irq_get_desc_buslock(irq, &flags, 0); in irq_set_chained_handler_and_data() local
1075 if (!desc) in irq_set_chained_handler_and_data()
1078 desc->irq_common_data.handler_data = data; in irq_set_chained_handler_and_data()
1079 __irq_do_set_handler(desc, handle, 1, NULL); in irq_set_chained_handler_and_data()
1081 irq_put_desc_busunlock(desc, flags); in irq_set_chained_handler_and_data()
1097 struct irq_desc *desc = irq_get_desc_lock(irq, &flags, 0); in irq_modify_status() local
1099 if (!desc) in irq_modify_status()
1106 WARN_ON_ONCE(!desc->depth && (set & _IRQ_NOAUTOEN)); in irq_modify_status()
1108 irq_settings_clr_and_set(desc, clr, set); in irq_modify_status()
1110 trigger = irqd_get_trigger_type(&desc->irq_data); in irq_modify_status()
1112 irqd_clear(&desc->irq_data, IRQD_NO_BALANCING | IRQD_PER_CPU | in irq_modify_status()
1114 if (irq_settings_has_no_balance_set(desc)) in irq_modify_status()
1115 irqd_set(&desc->irq_data, IRQD_NO_BALANCING); in irq_modify_status()
1116 if (irq_settings_is_per_cpu(desc)) in irq_modify_status()
1117 irqd_set(&desc->irq_data, IRQD_PER_CPU); in irq_modify_status()
1118 if (irq_settings_can_move_pcntxt(desc)) in irq_modify_status()
1119 irqd_set(&desc->irq_data, IRQD_MOVE_PCNTXT); in irq_modify_status()
1120 if (irq_settings_is_level(desc)) in irq_modify_status()
1121 irqd_set(&desc->irq_data, IRQD_LEVEL); in irq_modify_status()
1123 tmp = irq_settings_get_trigger_mask(desc); in irq_modify_status()
1127 irqd_set(&desc->irq_data, trigger); in irq_modify_status()
1129 irq_put_desc_unlock(desc, flags); in irq_modify_status()
1141 struct irq_desc *desc; in irq_cpu_online() local
1147 desc = irq_to_desc(irq); in irq_cpu_online()
1148 if (!desc) in irq_cpu_online()
1151 raw_spin_lock_irqsave(&desc->lock, flags); in irq_cpu_online()
1153 chip = irq_data_get_irq_chip(&desc->irq_data); in irq_cpu_online()
1156 !irqd_irq_disabled(&desc->irq_data))) in irq_cpu_online()
1157 chip->irq_cpu_online(&desc->irq_data); in irq_cpu_online()
1159 raw_spin_unlock_irqrestore(&desc->lock, flags); in irq_cpu_online()
1171 struct irq_desc *desc; in irq_cpu_offline() local
1177 desc = irq_to_desc(irq); in irq_cpu_offline()
1178 if (!desc) in irq_cpu_offline()
1181 raw_spin_lock_irqsave(&desc->lock, flags); in irq_cpu_offline()
1183 chip = irq_data_get_irq_chip(&desc->irq_data); in irq_cpu_offline()
1186 !irqd_irq_disabled(&desc->irq_data))) in irq_cpu_offline()
1187 chip->irq_cpu_offline(&desc->irq_data); in irq_cpu_offline()
1189 raw_spin_unlock_irqrestore(&desc->lock, flags); in irq_cpu_offline()
1206 void handle_fasteoi_ack_irq(struct irq_desc *desc) in handle_fasteoi_ack_irq() argument
1208 struct irq_chip *chip = desc->irq_data.chip; in handle_fasteoi_ack_irq()
1210 raw_spin_lock(&desc->lock); in handle_fasteoi_ack_irq()
1212 if (!irq_may_run(desc)) in handle_fasteoi_ack_irq()
1215 desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING); in handle_fasteoi_ack_irq()
1221 if (unlikely(!desc->action || irqd_irq_disabled(&desc->irq_data))) { in handle_fasteoi_ack_irq()
1222 desc->istate |= IRQS_PENDING; in handle_fasteoi_ack_irq()
1223 mask_irq(desc); in handle_fasteoi_ack_irq()
1227 kstat_incr_irqs_this_cpu(desc); in handle_fasteoi_ack_irq()
1228 if (desc->istate & IRQS_ONESHOT) in handle_fasteoi_ack_irq()
1229 mask_irq(desc); in handle_fasteoi_ack_irq()
1232 desc->irq_data.chip->irq_ack(&desc->irq_data); in handle_fasteoi_ack_irq()
1234 preflow_handler(desc); in handle_fasteoi_ack_irq()
1235 handle_irq_event(desc); in handle_fasteoi_ack_irq()
1237 cond_unmask_eoi_irq(desc, chip); in handle_fasteoi_ack_irq()
1239 raw_spin_unlock(&desc->lock); in handle_fasteoi_ack_irq()
1243 chip->irq_eoi(&desc->irq_data); in handle_fasteoi_ack_irq()
1244 raw_spin_unlock(&desc->lock); in handle_fasteoi_ack_irq()
1258 void handle_fasteoi_mask_irq(struct irq_desc *desc) in handle_fasteoi_mask_irq() argument
1260 struct irq_chip *chip = desc->irq_data.chip; in handle_fasteoi_mask_irq()
1262 raw_spin_lock(&desc->lock); in handle_fasteoi_mask_irq()
1263 mask_ack_irq(desc); in handle_fasteoi_mask_irq()
1265 if (!irq_may_run(desc)) in handle_fasteoi_mask_irq()
1268 desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING); in handle_fasteoi_mask_irq()
1274 if (unlikely(!desc->action || irqd_irq_disabled(&desc->irq_data))) { in handle_fasteoi_mask_irq()
1275 desc->istate |= IRQS_PENDING; in handle_fasteoi_mask_irq()
1276 mask_irq(desc); in handle_fasteoi_mask_irq()
1280 kstat_incr_irqs_this_cpu(desc); in handle_fasteoi_mask_irq()
1281 if (desc->istate & IRQS_ONESHOT) in handle_fasteoi_mask_irq()
1282 mask_irq(desc); in handle_fasteoi_mask_irq()
1284 preflow_handler(desc); in handle_fasteoi_mask_irq()
1285 handle_irq_event(desc); in handle_fasteoi_mask_irq()
1287 cond_unmask_eoi_irq(desc, chip); in handle_fasteoi_mask_irq()
1289 raw_spin_unlock(&desc->lock); in handle_fasteoi_mask_irq()
1293 chip->irq_eoi(&desc->irq_data); in handle_fasteoi_mask_irq()
1294 raw_spin_unlock(&desc->lock); in handle_fasteoi_mask_irq()