Lines Matching refs:info
260 static void set_info_for_irq(unsigned int irq, struct irq_info *info) in set_info_for_irq() argument
263 legacy_info_ptrs[irq] = info; in set_info_for_irq()
265 irq_set_chip_data(irq, info); in set_info_for_irq()
282 static void channels_on_cpu_dec(struct irq_info *info) in channels_on_cpu_dec() argument
284 if (!info->is_accounted) in channels_on_cpu_dec()
287 info->is_accounted = 0; in channels_on_cpu_dec()
289 if (WARN_ON_ONCE(info->cpu >= nr_cpu_ids)) in channels_on_cpu_dec()
292 WARN_ON_ONCE(!atomic_add_unless(&channels_on_cpu[info->cpu], -1 , 0)); in channels_on_cpu_dec()
295 static void channels_on_cpu_inc(struct irq_info *info) in channels_on_cpu_inc() argument
297 if (WARN_ON_ONCE(info->cpu >= nr_cpu_ids)) in channels_on_cpu_inc()
300 if (WARN_ON_ONCE(!atomic_add_unless(&channels_on_cpu[info->cpu], 1, in channels_on_cpu_inc()
304 info->is_accounted = 1; in channels_on_cpu_inc()
316 struct irq_info *info = container_of(to_rcu_work(work), struct irq_info, in delayed_free_irq() local
318 unsigned int irq = info->irq; in delayed_free_irq()
323 kfree(info); in delayed_free_irq()
329 static int xen_irq_info_common_setup(struct irq_info *info, in xen_irq_info_common_setup() argument
336 BUG_ON(info->type != IRQT_UNBOUND && info->type != type); in xen_irq_info_common_setup()
338 info->type = type; in xen_irq_info_common_setup()
339 info->evtchn = evtchn; in xen_irq_info_common_setup()
340 info->cpu = cpu; in xen_irq_info_common_setup()
341 info->mask_reason = EVT_MASK_REASON_EXPLICIT; in xen_irq_info_common_setup()
342 raw_spin_lock_init(&info->lock); in xen_irq_info_common_setup()
344 ret = set_evtchn_to_irq(evtchn, info->irq); in xen_irq_info_common_setup()
348 irq_clear_status_flags(info->irq, IRQ_NOREQUEST | IRQ_NOAUTOEN); in xen_irq_info_common_setup()
353 static int xen_irq_info_evtchn_setup(struct irq_info *info, in xen_irq_info_evtchn_setup() argument
359 ret = xen_irq_info_common_setup(info, IRQT_EVTCHN, evtchn, 0); in xen_irq_info_evtchn_setup()
360 info->u.interdomain = dev; in xen_irq_info_evtchn_setup()
367 static int xen_irq_info_ipi_setup(struct irq_info *info, unsigned int cpu, in xen_irq_info_ipi_setup() argument
370 info->u.ipi = ipi; in xen_irq_info_ipi_setup()
372 per_cpu(ipi_to_irq, cpu)[ipi] = info->irq; in xen_irq_info_ipi_setup()
375 return xen_irq_info_common_setup(info, IRQT_IPI, evtchn, 0); in xen_irq_info_ipi_setup()
378 static int xen_irq_info_virq_setup(struct irq_info *info, unsigned int cpu, in xen_irq_info_virq_setup() argument
381 info->u.virq = virq; in xen_irq_info_virq_setup()
383 per_cpu(virq_to_irq, cpu)[virq] = info->irq; in xen_irq_info_virq_setup()
385 return xen_irq_info_common_setup(info, IRQT_VIRQ, evtchn, 0); in xen_irq_info_virq_setup()
388 static int xen_irq_info_pirq_setup(struct irq_info *info, evtchn_port_t evtchn, in xen_irq_info_pirq_setup() argument
392 info->u.pirq.pirq = pirq; in xen_irq_info_pirq_setup()
393 info->u.pirq.gsi = gsi; in xen_irq_info_pirq_setup()
394 info->u.pirq.domid = domid; in xen_irq_info_pirq_setup()
395 info->u.pirq.flags = flags; in xen_irq_info_pirq_setup()
397 return xen_irq_info_common_setup(info, IRQT_PIRQ, evtchn, 0); in xen_irq_info_pirq_setup()
400 static void xen_irq_info_cleanup(struct irq_info *info) in xen_irq_info_cleanup() argument
402 set_evtchn_to_irq(info->evtchn, -1); in xen_irq_info_cleanup()
403 xen_evtchn_port_remove(info->evtchn, info->cpu); in xen_irq_info_cleanup()
404 info->evtchn = 0; in xen_irq_info_cleanup()
405 channels_on_cpu_dec(info); in xen_irq_info_cleanup()
413 const struct irq_info *info = NULL; in evtchn_from_irq() local
416 info = info_for_irq(irq); in evtchn_from_irq()
417 if (!info) in evtchn_from_irq()
420 return info->evtchn; in evtchn_from_irq()
425 struct irq_info *info = evtchn_to_info(evtchn); in irq_from_evtchn() local
427 return info ? info->irq : -1; in irq_from_evtchn()
441 static enum ipi_vector ipi_from_irq(struct irq_info *info) in ipi_from_irq() argument
443 BUG_ON(info == NULL); in ipi_from_irq()
444 BUG_ON(info->type != IRQT_IPI); in ipi_from_irq()
446 return info->u.ipi; in ipi_from_irq()
449 static unsigned int virq_from_irq(struct irq_info *info) in virq_from_irq() argument
451 BUG_ON(info == NULL); in virq_from_irq()
452 BUG_ON(info->type != IRQT_VIRQ); in virq_from_irq()
454 return info->u.virq; in virq_from_irq()
459 struct irq_info *info = info_for_irq(irq); in pirq_from_irq() local
461 BUG_ON(info == NULL); in pirq_from_irq()
462 BUG_ON(info->type != IRQT_PIRQ); in pirq_from_irq()
464 return info->u.pirq.pirq; in pirq_from_irq()
469 struct irq_info *info = evtchn_to_info(evtchn); in cpu_from_evtchn() local
471 return info ? info->cpu : 0; in cpu_from_evtchn()
474 static void do_mask(struct irq_info *info, u8 reason) in do_mask() argument
478 raw_spin_lock_irqsave(&info->lock, flags); in do_mask()
480 if (!info->mask_reason) in do_mask()
481 mask_evtchn(info->evtchn); in do_mask()
483 info->mask_reason |= reason; in do_mask()
485 raw_spin_unlock_irqrestore(&info->lock, flags); in do_mask()
488 static void do_unmask(struct irq_info *info, u8 reason) in do_unmask() argument
492 raw_spin_lock_irqsave(&info->lock, flags); in do_unmask()
494 info->mask_reason &= ~reason; in do_unmask()
496 if (!info->mask_reason) in do_unmask()
497 unmask_evtchn(info->evtchn); in do_unmask()
499 raw_spin_unlock_irqrestore(&info->lock, flags); in do_unmask()
511 struct irq_info *info = info_for_irq(irq); in pirq_needs_eoi_flag() local
512 BUG_ON(info->type != IRQT_PIRQ); in pirq_needs_eoi_flag()
514 return info->u.pirq.flags & PIRQ_NEEDS_EOI; in pirq_needs_eoi_flag()
517 static void bind_evtchn_to_cpu(struct irq_info *info, unsigned int cpu, in bind_evtchn_to_cpu() argument
521 struct irq_data *data = irq_get_irq_data(info->irq); in bind_evtchn_to_cpu()
527 xen_evtchn_port_bind_to_cpu(info->evtchn, cpu, info->cpu); in bind_evtchn_to_cpu()
529 channels_on_cpu_dec(info); in bind_evtchn_to_cpu()
530 info->cpu = cpu; in bind_evtchn_to_cpu()
531 channels_on_cpu_inc(info); in bind_evtchn_to_cpu()
559 static void lateeoi_list_del(struct irq_info *info) in lateeoi_list_del() argument
561 struct lateeoi_work *eoi = &per_cpu(lateeoi, info->eoi_cpu); in lateeoi_list_del()
565 list_del_init(&info->eoi_list); in lateeoi_list_del()
569 static void lateeoi_list_add(struct irq_info *info) in lateeoi_list_add() argument
571 struct lateeoi_work *eoi = &per_cpu(lateeoi, info->eoi_cpu); in lateeoi_list_add()
577 if (now < info->eoi_time) in lateeoi_list_add()
578 delay = info->eoi_time - now; in lateeoi_list_add()
586 if (!elem || info->eoi_time < elem->eoi_time) { in lateeoi_list_add()
587 list_add(&info->eoi_list, &eoi->eoi_list); in lateeoi_list_add()
588 mod_delayed_work_on(info->eoi_cpu, system_wq, in lateeoi_list_add()
592 if (elem->eoi_time <= info->eoi_time) in lateeoi_list_add()
595 list_add(&info->eoi_list, &elem->eoi_list); in lateeoi_list_add()
601 static void xen_irq_lateeoi_locked(struct irq_info *info, bool spurious) in xen_irq_lateeoi_locked() argument
607 evtchn = info->evtchn; in xen_irq_lateeoi_locked()
608 if (!VALID_EVTCHN(evtchn) || !list_empty(&info->eoi_list)) in xen_irq_lateeoi_locked()
612 struct xenbus_device *dev = info->u.interdomain; in xen_irq_lateeoi_locked()
618 if ((1 << info->spurious_cnt) < (HZ << 2)) { in xen_irq_lateeoi_locked()
619 if (info->spurious_cnt != 0xFF) in xen_irq_lateeoi_locked()
620 info->spurious_cnt++; in xen_irq_lateeoi_locked()
622 if (info->spurious_cnt > threshold) { in xen_irq_lateeoi_locked()
623 delay = 1 << (info->spurious_cnt - 1 - threshold); in xen_irq_lateeoi_locked()
626 if (!info->eoi_time) in xen_irq_lateeoi_locked()
627 info->eoi_cpu = smp_processor_id(); in xen_irq_lateeoi_locked()
628 info->eoi_time = get_jiffies_64() + delay; in xen_irq_lateeoi_locked()
635 info->spurious_cnt = 0; in xen_irq_lateeoi_locked()
638 cpu = info->eoi_cpu; in xen_irq_lateeoi_locked()
639 if (info->eoi_time && in xen_irq_lateeoi_locked()
640 (info->irq_epoch == per_cpu(irq_epoch, cpu) || delay)) { in xen_irq_lateeoi_locked()
641 lateeoi_list_add(info); in xen_irq_lateeoi_locked()
645 info->eoi_time = 0; in xen_irq_lateeoi_locked()
648 smp_store_release(&info->is_active, 0); in xen_irq_lateeoi_locked()
649 do_unmask(info, EVT_MASK_REASON_EOI_PENDING); in xen_irq_lateeoi_locked()
655 struct irq_info *info; in xen_irq_lateeoi_worker() local
666 info = list_first_entry_or_null(&eoi->eoi_list, struct irq_info, in xen_irq_lateeoi_worker()
669 if (info == NULL) in xen_irq_lateeoi_worker()
672 if (now < info->eoi_time) { in xen_irq_lateeoi_worker()
673 mod_delayed_work_on(info->eoi_cpu, system_wq, in xen_irq_lateeoi_worker()
675 info->eoi_time - now); in xen_irq_lateeoi_worker()
679 list_del_init(&info->eoi_list); in xen_irq_lateeoi_worker()
683 info->eoi_time = 0; in xen_irq_lateeoi_worker()
685 xen_irq_lateeoi_locked(info, false); in xen_irq_lateeoi_worker()
704 struct irq_info *info; in xen_irq_lateeoi() local
708 info = info_for_irq(irq); in xen_irq_lateeoi()
710 if (info) in xen_irq_lateeoi()
711 xen_irq_lateeoi_locked(info, eoi_flags & XEN_EOI_FLAG_SPURIOUS); in xen_irq_lateeoi()
719 struct irq_info *info; in xen_irq_init() local
721 info = kzalloc(sizeof(*info), GFP_KERNEL); in xen_irq_init()
722 if (info) { in xen_irq_init()
723 info->irq = irq; in xen_irq_init()
724 info->type = IRQT_UNBOUND; in xen_irq_init()
725 info->refcnt = -1; in xen_irq_init()
726 INIT_RCU_WORK(&info->rwork, delayed_free_irq); in xen_irq_init()
728 set_info_for_irq(irq, info); in xen_irq_init()
735 INIT_LIST_HEAD(&info->eoi_list); in xen_irq_init()
736 list_add_tail(&info->list, &xen_irq_list_head); in xen_irq_init()
739 return info; in xen_irq_init()
745 struct irq_info *info = NULL; in xen_allocate_irq_dynamic() local
748 info = xen_irq_init(irq); in xen_allocate_irq_dynamic()
749 if (!info) in xen_allocate_irq_dynamic()
753 return info; in xen_allocate_irq_dynamic()
759 struct irq_info *info; in xen_allocate_irq_gsi() local
776 info = xen_irq_init(irq); in xen_allocate_irq_gsi()
777 if (!info) in xen_allocate_irq_gsi()
780 return info; in xen_allocate_irq_gsi()
783 static void xen_free_irq(struct irq_info *info) in xen_free_irq() argument
785 if (WARN_ON(!info)) in xen_free_irq()
788 if (!list_empty(&info->eoi_list)) in xen_free_irq()
789 lateeoi_list_del(info); in xen_free_irq()
791 list_del(&info->list); in xen_free_irq()
793 WARN_ON(info->refcnt > 0); in xen_free_irq()
795 queue_rcu_work(system_wq, &info->rwork); in xen_free_irq()
799 static void event_handler_exit(struct irq_info *info) in event_handler_exit() argument
801 smp_store_release(&info->is_active, 0); in event_handler_exit()
802 clear_evtchn(info->evtchn); in event_handler_exit()
808 struct irq_info *info = info_for_irq(irq); in pirq_query_unmask() local
810 BUG_ON(info->type != IRQT_PIRQ); in pirq_query_unmask()
816 info->u.pirq.flags &= ~PIRQ_NEEDS_EOI; in pirq_query_unmask()
818 info->u.pirq.flags |= PIRQ_NEEDS_EOI; in pirq_query_unmask()
823 struct irq_info *info = info_for_irq(data->irq); in eoi_pirq() local
824 evtchn_port_t evtchn = info ? info->evtchn : 0; in eoi_pirq()
831 event_handler_exit(info); in eoi_pirq()
848 struct irq_info *info = info_for_irq(irq); in __startup_pirq() local
852 BUG_ON(info->type != IRQT_PIRQ); in __startup_pirq()
859 bind_pirq.flags = info->u.pirq.flags & PIRQ_SHAREABLE ? in __startup_pirq()
874 info->evtchn = evtchn; in __startup_pirq()
875 bind_evtchn_to_cpu(info, 0, false); in __startup_pirq()
882 do_unmask(info, EVT_MASK_REASON_EXPLICIT); in __startup_pirq()
902 struct irq_info *info = info_for_irq(irq); in shutdown_pirq() local
905 BUG_ON(info->type != IRQT_PIRQ); in shutdown_pirq()
910 do_mask(info, EVT_MASK_REASON_EXPLICIT); in shutdown_pirq()
911 xen_irq_info_cleanup(info); in shutdown_pirq()
927 struct irq_info *info; in xen_irq_from_gsi() local
929 list_for_each_entry(info, &xen_irq_list_head, list) { in xen_irq_from_gsi()
930 if (info->type != IRQT_PIRQ) in xen_irq_from_gsi()
933 if (info->u.pirq.gsi == gsi) in xen_irq_from_gsi()
934 return info->irq; in xen_irq_from_gsi()
941 static void __unbind_from_irq(struct irq_info *info, unsigned int irq) in __unbind_from_irq() argument
946 if (!info) { in __unbind_from_irq()
951 if (info->refcnt > 0) { in __unbind_from_irq()
952 info->refcnt--; in __unbind_from_irq()
953 if (info->refcnt != 0) in __unbind_from_irq()
957 evtchn = info->evtchn; in __unbind_from_irq()
960 unsigned int cpu = info->cpu; in __unbind_from_irq()
963 if (!info->is_static) in __unbind_from_irq()
966 switch (info->type) { in __unbind_from_irq()
968 per_cpu(virq_to_irq, cpu)[virq_from_irq(info)] = -1; in __unbind_from_irq()
971 per_cpu(ipi_to_irq, cpu)[ipi_from_irq(info)] = -1; in __unbind_from_irq()
972 per_cpu(ipi_to_evtchn, cpu)[ipi_from_irq(info)] = 0; in __unbind_from_irq()
975 dev = info->u.interdomain; in __unbind_from_irq()
983 xen_irq_info_cleanup(info); in __unbind_from_irq()
989 xen_free_irq(info); in __unbind_from_irq()
1005 struct irq_info *info; in xen_bind_pirq_gsi_to_irq() local
1018 info = xen_allocate_irq_gsi(gsi); in xen_bind_pirq_gsi_to_irq()
1019 if (!info) in xen_bind_pirq_gsi_to_irq()
1022 irq_op.irq = info->irq; in xen_bind_pirq_gsi_to_irq()
1030 xen_free_irq(info); in xen_bind_pirq_gsi_to_irq()
1035 ret = xen_irq_info_pirq_setup(info, 0, pirq, gsi, DOMID_SELF, in xen_bind_pirq_gsi_to_irq()
1038 __unbind_from_irq(info, info->irq); in xen_bind_pirq_gsi_to_irq()
1042 pirq_query_unmask(info->irq); in xen_bind_pirq_gsi_to_irq()
1059 irq_set_chip_and_handler_name(info->irq, &xen_pirq_chip, in xen_bind_pirq_gsi_to_irq()
1062 irq_set_chip_and_handler_name(info->irq, &xen_pirq_chip, in xen_bind_pirq_gsi_to_irq()
1065 ret = info->irq; in xen_bind_pirq_gsi_to_irq()
1092 struct irq_info *info; in xen_bind_pirq_msi_to_irq() local
1101 info = xen_irq_init(irq + i); in xen_bind_pirq_msi_to_irq()
1102 if (!info) { in xen_bind_pirq_msi_to_irq()
1109 ret = xen_irq_info_pirq_setup(info, 0, pirq + i, 0, domid, in xen_bind_pirq_msi_to_irq()
1124 info = info_for_irq(irq + nvec); in xen_bind_pirq_msi_to_irq()
1125 __unbind_from_irq(info, irq + nvec); in xen_bind_pirq_msi_to_irq()
1135 struct irq_info *info = info_for_irq(irq); in xen_destroy_irq() local
1145 if (xen_initial_domain() && !(info->u.pirq.flags & PIRQ_MSI_GROUP)) { in xen_destroy_irq()
1146 unmap_irq.pirq = info->u.pirq.pirq; in xen_destroy_irq()
1147 unmap_irq.domid = info->u.pirq.domid; in xen_destroy_irq()
1153 if ((rc == -ESRCH && info->u.pirq.domid != DOMID_SELF)) in xen_destroy_irq()
1155 info->u.pirq.domid, info->u.pirq.pirq); in xen_destroy_irq()
1162 xen_free_irq(info); in xen_destroy_irq()
1173 struct irq_info *info; in xen_irq_from_pirq() local
1177 list_for_each_entry(info, &xen_irq_list_head, list) { in xen_irq_from_pirq()
1178 if (info->type != IRQT_PIRQ) in xen_irq_from_pirq()
1180 irq = info->irq; in xen_irq_from_pirq()
1181 if (info->u.pirq.pirq == pirq) in xen_irq_from_pirq()
1202 struct irq_info *info; in bind_evtchn_to_irq_chip() local
1209 info = evtchn_to_info(evtchn); in bind_evtchn_to_irq_chip()
1211 if (!info) { in bind_evtchn_to_irq_chip()
1212 info = xen_allocate_irq_dynamic(); in bind_evtchn_to_irq_chip()
1213 if (!info) in bind_evtchn_to_irq_chip()
1216 irq_set_chip_and_handler_name(info->irq, chip, in bind_evtchn_to_irq_chip()
1219 ret = xen_irq_info_evtchn_setup(info, evtchn, dev); in bind_evtchn_to_irq_chip()
1221 __unbind_from_irq(info, info->irq); in bind_evtchn_to_irq_chip()
1231 bind_evtchn_to_cpu(info, 0, false); in bind_evtchn_to_irq_chip()
1232 } else if (!WARN_ON(info->type != IRQT_EVTCHN)) { in bind_evtchn_to_irq_chip()
1233 info->refcnt++; in bind_evtchn_to_irq_chip()
1236 ret = info->irq; in bind_evtchn_to_irq_chip()
1260 struct irq_info *info; in bind_ipi_to_irq() local
1268 info = xen_allocate_irq_dynamic(); in bind_ipi_to_irq()
1269 if (!info) in bind_ipi_to_irq()
1272 irq_set_chip_and_handler_name(info->irq, &xen_percpu_chip, in bind_ipi_to_irq()
1281 ret = xen_irq_info_ipi_setup(info, cpu, evtchn, ipi); in bind_ipi_to_irq()
1283 __unbind_from_irq(info, info->irq); in bind_ipi_to_irq()
1290 bind_evtchn_to_cpu(info, cpu, true); in bind_ipi_to_irq()
1291 ret = info->irq; in bind_ipi_to_irq()
1293 info = info_for_irq(ret); in bind_ipi_to_irq()
1294 WARN_ON(info == NULL || info->type != IRQT_IPI); in bind_ipi_to_irq()
1367 struct irq_info *info; in bind_virq_to_irq() local
1375 info = xen_allocate_irq_dynamic(); in bind_virq_to_irq()
1376 if (!info) in bind_virq_to_irq()
1380 irq_set_chip_and_handler_name(info->irq, &xen_percpu_chip, in bind_virq_to_irq()
1383 irq_set_chip_and_handler_name(info->irq, &xen_dynamic_chip, in bind_virq_to_irq()
1398 ret = xen_irq_info_virq_setup(info, cpu, evtchn, virq); in bind_virq_to_irq()
1400 __unbind_from_irq(info, info->irq); in bind_virq_to_irq()
1408 bind_evtchn_to_cpu(info, cpu, percpu); in bind_virq_to_irq()
1409 ret = info->irq; in bind_virq_to_irq()
1411 info = info_for_irq(ret); in bind_virq_to_irq()
1412 WARN_ON(info == NULL || info->type != IRQT_VIRQ); in bind_virq_to_irq()
1423 struct irq_info *info; in unbind_from_irq() local
1426 info = info_for_irq(irq); in unbind_from_irq()
1427 __unbind_from_irq(info, irq); in unbind_from_irq()
1550 struct irq_info *info = info_for_irq(irq); in unbind_from_irqhandler() local
1552 if (WARN_ON(!info)) in unbind_from_irqhandler()
1578 struct irq_info *info = evtchn_to_info(evtchn); in evtchn_make_refcounted() local
1580 if (!info) in evtchn_make_refcounted()
1583 WARN_ON(info->refcnt != -1); in evtchn_make_refcounted()
1585 info->refcnt = 1; in evtchn_make_refcounted()
1586 info->is_static = is_static; in evtchn_make_refcounted()
1594 struct irq_info *info; in evtchn_get() local
1602 info = evtchn_to_info(evtchn); in evtchn_get()
1604 if (!info) in evtchn_get()
1608 if (info->refcnt <= 0 || info->refcnt == SHRT_MAX) in evtchn_get()
1611 info->refcnt++; in evtchn_get()
1622 struct irq_info *info = evtchn_to_info(evtchn); in evtchn_put() local
1624 if (WARN_ON(!info)) in evtchn_put()
1626 unbind_from_irq(info->irq); in evtchn_put()
1656 struct irq_info *info = evtchn_to_info(port); in handle_irq_for_port() local
1659 if (!info) in handle_irq_for_port()
1684 if (xchg_acquire(&info->is_active, 1)) in handle_irq_for_port()
1687 dev = (info->type == IRQT_EVTCHN) ? info->u.interdomain : NULL; in handle_irq_for_port()
1692 info->eoi_cpu = smp_processor_id(); in handle_irq_for_port()
1693 info->irq_epoch = __this_cpu_read(irq_epoch); in handle_irq_for_port()
1694 info->eoi_time = get_jiffies_64() + event_eoi_delay; in handle_irq_for_port()
1697 generic_handle_irq(info->irq); in handle_irq_for_port()
1743 struct irq_info *info = info_for_irq(irq); in rebind_evtchn_irq() local
1745 if (WARN_ON(!info)) in rebind_evtchn_irq()
1758 BUG_ON(info->type == IRQT_UNBOUND); in rebind_evtchn_irq()
1760 info->irq = irq; in rebind_evtchn_irq()
1761 (void)xen_irq_info_evtchn_setup(info, evtchn, NULL); in rebind_evtchn_irq()
1765 bind_evtchn_to_cpu(info, info->cpu, false); in rebind_evtchn_irq()
1772 static int xen_rebind_evtchn_to_cpu(struct irq_info *info, unsigned int tcpu) in xen_rebind_evtchn_to_cpu() argument
1775 evtchn_port_t evtchn = info ? info->evtchn : 0; in xen_rebind_evtchn_to_cpu()
1791 do_mask(info, EVT_MASK_REASON_TEMPORARY); in xen_rebind_evtchn_to_cpu()
1799 bind_evtchn_to_cpu(info, tcpu, false); in xen_rebind_evtchn_to_cpu()
1801 do_unmask(info, EVT_MASK_REASON_TEMPORARY); in xen_rebind_evtchn_to_cpu()
1849 struct irq_info *info = info_for_irq(data->irq); in enable_dynirq() local
1850 evtchn_port_t evtchn = info ? info->evtchn : 0; in enable_dynirq()
1853 do_unmask(info, EVT_MASK_REASON_EXPLICIT); in enable_dynirq()
1858 struct irq_info *info = info_for_irq(data->irq); in disable_dynirq() local
1859 evtchn_port_t evtchn = info ? info->evtchn : 0; in disable_dynirq()
1862 do_mask(info, EVT_MASK_REASON_EXPLICIT); in disable_dynirq()
1867 struct irq_info *info = info_for_irq(data->irq); in ack_dynirq() local
1868 evtchn_port_t evtchn = info ? info->evtchn : 0; in ack_dynirq()
1871 event_handler_exit(info); in ack_dynirq()
1882 struct irq_info *info = info_for_irq(data->irq); in lateeoi_ack_dynirq() local
1883 evtchn_port_t evtchn = info ? info->evtchn : 0; in lateeoi_ack_dynirq()
1886 do_mask(info, EVT_MASK_REASON_EOI_PENDING); in lateeoi_ack_dynirq()
1898 struct irq_info *info = info_for_irq(data->irq); in lateeoi_mask_ack_dynirq() local
1899 evtchn_port_t evtchn = info ? info->evtchn : 0; in lateeoi_mask_ack_dynirq()
1902 do_mask(info, EVT_MASK_REASON_EXPLICIT); in lateeoi_mask_ack_dynirq()
1903 event_handler_exit(info); in lateeoi_mask_ack_dynirq()
1909 struct irq_info *info = info_for_irq(data->irq); in retrigger_dynirq() local
1910 evtchn_port_t evtchn = info ? info->evtchn : 0; in retrigger_dynirq()
1915 do_mask(info, EVT_MASK_REASON_TEMPORARY); in retrigger_dynirq()
1917 do_unmask(info, EVT_MASK_REASON_TEMPORARY); in retrigger_dynirq()
1926 struct irq_info *info; in restore_pirqs() local
1928 list_for_each_entry(info, &xen_irq_list_head, list) { in restore_pirqs()
1929 if (info->type != IRQT_PIRQ) in restore_pirqs()
1932 pirq = info->u.pirq.pirq; in restore_pirqs()
1933 gsi = info->u.pirq.gsi; in restore_pirqs()
1934 irq = info->irq; in restore_pirqs()
1950 xen_free_irq(info); in restore_pirqs()
1964 struct irq_info *info; in restore_cpu_virqs() local
1970 info = info_for_irq(irq); in restore_cpu_virqs()
1972 BUG_ON(virq_from_irq(info) != virq); in restore_cpu_virqs()
1983 xen_irq_info_virq_setup(info, cpu, evtchn, virq); in restore_cpu_virqs()
1985 bind_evtchn_to_cpu(info, cpu, false); in restore_cpu_virqs()
1993 struct irq_info *info; in restore_cpu_ipis() local
1999 info = info_for_irq(irq); in restore_cpu_ipis()
2001 BUG_ON(ipi_from_irq(info) != ipi); in restore_cpu_ipis()
2011 xen_irq_info_ipi_setup(info, cpu, evtchn, ipi); in restore_cpu_ipis()
2013 bind_evtchn_to_cpu(info, cpu, false); in restore_cpu_ipis()
2020 struct irq_info *info = info_for_irq(irq); in xen_clear_irq_pending() local
2021 evtchn_port_t evtchn = info ? info->evtchn : 0; in xen_clear_irq_pending()
2024 event_handler_exit(info); in xen_clear_irq_pending()
2074 struct irq_info *info = info_for_irq(irq); in xen_test_irq_shared() local
2077 if (WARN_ON(!info)) in xen_test_irq_shared()
2080 irq_status.irq = info->u.pirq.pirq; in xen_test_irq_shared()
2091 struct irq_info *info; in xen_irq_resume() local
2097 list_for_each_entry(info, &xen_irq_list_head, list) { in xen_irq_resume()
2099 info->evtchn = 0; in xen_irq_resume()
2101 channels_on_cpu_dec(info); in xen_irq_resume()