• Home
  • Raw
  • Download

Lines Matching refs:domain

469 static void msi_check_level(struct irq_domain *domain, struct msi_msg *msg)  in msi_check_level()  argument
471 struct msi_domain_info *info = domain->host_data; in msi_check_level()
503 msi_check_level(irq_data->domain, msg); in msi_domain_set_affinity()
510 static int msi_domain_activate(struct irq_domain *domain, in msi_domain_activate() argument
516 msi_check_level(irq_data->domain, msg); in msi_domain_activate()
521 static void msi_domain_deactivate(struct irq_domain *domain, in msi_domain_deactivate() argument
530 static int msi_domain_alloc(struct irq_domain *domain, unsigned int virq, in msi_domain_alloc() argument
533 struct msi_domain_info *info = domain->host_data; in msi_domain_alloc()
538 if (irq_find_mapping(domain, hwirq) > 0) in msi_domain_alloc()
541 if (domain->parent) { in msi_domain_alloc()
542 ret = irq_domain_alloc_irqs_parent(domain, virq, nr_irqs, arg); in msi_domain_alloc()
548 ret = ops->msi_init(domain, info, virq + i, hwirq + i, arg); in msi_domain_alloc()
552 ops->msi_free(domain, info, virq + i); in msi_domain_alloc()
554 irq_domain_free_irqs_top(domain, virq, nr_irqs); in msi_domain_alloc()
562 static void msi_domain_free(struct irq_domain *domain, unsigned int virq, in msi_domain_free() argument
565 struct msi_domain_info *info = domain->host_data; in msi_domain_free()
570 info->ops->msi_free(domain, info, virq + i); in msi_domain_free()
572 irq_domain_free_irqs_top(domain, virq, nr_irqs); in msi_domain_free()
588 static int msi_domain_ops_prepare(struct irq_domain *domain, struct device *dev, in msi_domain_ops_prepare() argument
601 static int msi_domain_ops_init(struct irq_domain *domain, in msi_domain_ops_init() argument
606 irq_domain_set_hwirq_and_chip(domain, virq, hwirq, info->chip, in msi_domain_ops_init()
616 static int msi_domain_ops_check(struct irq_domain *domain, in msi_domain_ops_check() argument
683 struct irq_domain *domain; in msi_create_irq_domain() local
689 domain = irq_domain_create_hierarchy(parent, IRQ_DOMAIN_FLAG_MSI, 0, in msi_create_irq_domain()
692 if (domain && !domain->name && info->chip) in msi_create_irq_domain()
693 domain->name = info->chip->name; in msi_create_irq_domain()
695 return domain; in msi_create_irq_domain()
698 int msi_domain_prepare_irqs(struct irq_domain *domain, struct device *dev, in msi_domain_prepare_irqs() argument
701 struct msi_domain_info *info = domain->host_data; in msi_domain_prepare_irqs()
705 ret = ops->msi_check(domain, info, dev); in msi_domain_prepare_irqs()
707 ret = ops->msi_prepare(domain, dev, nvec, arg); in msi_domain_prepare_irqs()
712 int msi_domain_populate_irqs(struct irq_domain *domain, struct device *dev, in msi_domain_populate_irqs() argument
715 struct msi_domain_info *info = domain->host_data; in msi_domain_populate_irqs()
730 ret = irq_domain_alloc_irqs_hierarchy(domain, virq, 1, arg); in msi_domain_populate_irqs()
741 irq_domain_free_irqs_common(domain, virq, 1); in msi_domain_populate_irqs()
759 static bool msi_check_reservation_mode(struct irq_domain *domain, in msi_check_reservation_mode() argument
765 switch(domain->bus_token) { in msi_check_reservation_mode()
787 static int msi_handle_pci_fail(struct irq_domain *domain, struct msi_desc *desc, in msi_handle_pci_fail() argument
790 switch(domain->bus_token) { in msi_handle_pci_fail()
811 static int msi_init_virq(struct irq_domain *domain, int virq, unsigned int vflags) in msi_init_virq() argument
813 struct irq_data *irqd = irq_domain_get_irq_data(domain, virq); in msi_init_virq()
850 int __msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev, in __msi_domain_alloc_irqs() argument
853 struct msi_domain_info *info = domain->host_data; in __msi_domain_alloc_irqs()
861 ret = msi_domain_prepare_irqs(domain, dev, nvec, &arg); in __msi_domain_alloc_irqs()
877 if (msi_check_reservation_mode(domain, info, dev)) in __msi_domain_alloc_irqs()
883 virq = __irq_domain_alloc_irqs(domain, -1, desc->nvec_used, in __msi_domain_alloc_irqs()
887 return msi_handle_pci_fail(domain, desc, allocated); in __msi_domain_alloc_irqs()
892 ret = msi_init_virq(domain, virq + i, vflags); in __msi_domain_alloc_irqs()
929 int msi_domain_alloc_irqs_descs_locked(struct irq_domain *domain, struct device *dev, in msi_domain_alloc_irqs_descs_locked() argument
932 struct msi_domain_info *info = domain->host_data; in msi_domain_alloc_irqs_descs_locked()
942 ret = ops->domain_alloc_irqs(domain, dev, nvec); in msi_domain_alloc_irqs_descs_locked()
944 msi_domain_free_irqs_descs_locked(domain, dev); in msi_domain_alloc_irqs_descs_locked()
957 int msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev, int nvec) in msi_domain_alloc_irqs() argument
962 ret = msi_domain_alloc_irqs_descs_locked(domain, dev, nvec); in msi_domain_alloc_irqs()
967 void __msi_domain_free_irqs(struct irq_domain *domain, struct device *dev) in __msi_domain_free_irqs() argument
969 struct msi_domain_info *info = domain->host_data; in __msi_domain_free_irqs()
978 irqd = irq_domain_get_irq_data(domain, desc->irq + i); in __msi_domain_free_irqs()
1007 void msi_domain_free_irqs_descs_locked(struct irq_domain *domain, struct device *dev) in msi_domain_free_irqs_descs_locked() argument
1009 struct msi_domain_info *info = domain->host_data; in msi_domain_free_irqs_descs_locked()
1014 ops->domain_free_irqs(domain, dev); in msi_domain_free_irqs_descs_locked()
1024 void msi_domain_free_irqs(struct irq_domain *domain, struct device *dev) in msi_domain_free_irqs() argument
1027 msi_domain_free_irqs_descs_locked(domain, dev); in msi_domain_free_irqs()
1037 struct msi_domain_info *msi_get_domain_info(struct irq_domain *domain) in msi_get_domain_info() argument
1039 return (struct msi_domain_info *)domain->host_data; in msi_get_domain_info()