Lines Matching refs:msix
739 static void hfi1_update_sdma_affinity(struct hfi1_msix_entry *msix, int cpu) in hfi1_update_sdma_affinity() argument
741 struct sdma_engine *sde = msix->arg; in hfi1_update_sdma_affinity()
757 cpumask_clear(&msix->mask); in hfi1_update_sdma_affinity()
758 cpumask_set_cpu(cpu, &msix->mask); in hfi1_update_sdma_affinity()
760 msix->irq, irq_type_names[msix->type], in hfi1_update_sdma_affinity()
762 irq_set_affinity_hint(msix->irq, &msix->mask); in hfi1_update_sdma_affinity()
775 if (other_msix->type != IRQ_SDMA || other_msix == msix) in hfi1_update_sdma_affinity()
791 struct hfi1_msix_entry *msix = container_of(notify, in hfi1_irq_notifier_notify() local
796 hfi1_update_sdma_affinity(msix, cpu); in hfi1_irq_notifier_notify()
807 static void hfi1_setup_sdma_notifier(struct hfi1_msix_entry *msix) in hfi1_setup_sdma_notifier() argument
809 struct irq_affinity_notify *notify = &msix->notify; in hfi1_setup_sdma_notifier()
811 notify->irq = msix->irq; in hfi1_setup_sdma_notifier()
820 static void hfi1_cleanup_sdma_notifier(struct hfi1_msix_entry *msix) in hfi1_cleanup_sdma_notifier() argument
822 struct irq_affinity_notify *notify = &msix->notify; in hfi1_cleanup_sdma_notifier()
834 struct hfi1_msix_entry *msix) in get_irq_affinity() argument
845 cpumask_clear(&msix->mask); in get_irq_affinity()
849 switch (msix->type) { in get_irq_affinity()
851 sde = (struct sdma_engine *)msix->arg; in get_irq_affinity()
859 rcd = (struct hfi1_ctxtdata *)msix->arg; in get_irq_affinity()
867 rcd = (struct hfi1_ctxtdata *)msix->arg; in get_irq_affinity()
872 dd_dev_err(dd, "Invalid IRQ type %d\n", msix->type); in get_irq_affinity()
895 cpumask_set_cpu(cpu, &msix->mask); in get_irq_affinity()
897 msix->irq, irq_type_names[msix->type], in get_irq_affinity()
899 irq_set_affinity_hint(msix->irq, &msix->mask); in get_irq_affinity()
901 if (msix->type == IRQ_SDMA) { in get_irq_affinity()
903 hfi1_setup_sdma_notifier(msix); in get_irq_affinity()
909 int hfi1_get_irq_affinity(struct hfi1_devdata *dd, struct hfi1_msix_entry *msix) in hfi1_get_irq_affinity() argument
914 ret = get_irq_affinity(dd, msix); in hfi1_get_irq_affinity()
920 struct hfi1_msix_entry *msix) in hfi1_put_irq_affinity() argument
928 switch (msix->type) { in hfi1_put_irq_affinity()
931 hfi1_cleanup_sdma_notifier(msix); in hfi1_put_irq_affinity()
937 struct hfi1_ctxtdata *rcd = msix->arg; in hfi1_put_irq_affinity()
953 cpumask_andnot(&set->used, &set->used, &msix->mask); in hfi1_put_irq_affinity()
957 irq_set_affinity_hint(msix->irq, NULL); in hfi1_put_irq_affinity()
958 cpumask_clear(&msix->mask); in hfi1_put_irq_affinity()