Lines Matching refs:hwirq
527 irq_hw_number_t hwirq) in irq_domain_clear_mapping() argument
533 if (hwirq < domain->revmap_size) in irq_domain_clear_mapping()
534 rcu_assign_pointer(domain->revmap[hwirq], NULL); in irq_domain_clear_mapping()
536 radix_tree_delete(&domain->revmap_tree, hwirq); in irq_domain_clear_mapping()
541 irq_hw_number_t hwirq, in irq_domain_set_mapping() argument
548 if (hwirq < domain->revmap_size) in irq_domain_set_mapping()
549 rcu_assign_pointer(domain->revmap[hwirq], irq_data); in irq_domain_set_mapping()
551 radix_tree_insert(&domain->revmap_tree, hwirq, irq_data); in irq_domain_set_mapping()
558 irq_hw_number_t hwirq; in irq_domain_disassociate() local
564 hwirq = irq_data->hwirq; in irq_domain_disassociate()
582 irq_data->hwirq = 0; in irq_domain_disassociate()
586 irq_domain_clear_mapping(domain, hwirq); in irq_domain_disassociate()
592 irq_hw_number_t hwirq) in irq_domain_associate_locked() argument
597 if (WARN(hwirq >= domain->hwirq_max, in irq_domain_associate_locked()
598 "error: hwirq 0x%x is too large for %s\n", (int)hwirq, domain->name)) in irq_domain_associate_locked()
605 irq_data->hwirq = hwirq; in irq_domain_associate_locked()
608 ret = domain->ops->map(domain, virq, hwirq); in irq_domain_associate_locked()
617 domain->name, hwirq, virq, ret); in irq_domain_associate_locked()
620 irq_data->hwirq = 0; in irq_domain_associate_locked()
630 irq_domain_set_mapping(domain, hwirq, irq_data); in irq_domain_associate_locked()
638 irq_hw_number_t hwirq) in irq_domain_associate() argument
643 ret = irq_domain_associate_locked(domain, virq, hwirq); in irq_domain_associate()
710 irq_hw_number_t hwirq, in irq_create_mapping_affinity_locked() argument
716 pr_debug("irq_create_mapping(0x%p, 0x%lx)\n", domain, hwirq); in irq_create_mapping_affinity_locked()
719 virq = irq_domain_alloc_descs(-1, 1, hwirq, of_node_to_nid(of_node), in irq_create_mapping_affinity_locked()
726 if (irq_domain_associate_locked(domain, virq, hwirq)) { in irq_create_mapping_affinity_locked()
732 hwirq, of_node_full_name(of_node), virq); in irq_create_mapping_affinity_locked()
749 irq_hw_number_t hwirq, in irq_create_mapping_affinity() argument
758 WARN(1, "%s(, %lx) called with NULL domain\n", __func__, hwirq); in irq_create_mapping_affinity()
765 virq = irq_find_mapping(domain, hwirq); in irq_create_mapping_affinity()
771 virq = irq_create_mapping_affinity_locked(domain, hwirq, affinity); in irq_create_mapping_affinity()
781 irq_hw_number_t *hwirq, unsigned int *type) in irq_domain_translate() argument
785 return d->ops->translate(d, fwspec, hwirq, type); in irq_domain_translate()
790 hwirq, type); in irq_domain_translate()
793 *hwirq = fwspec->param[0]; in irq_domain_translate()
814 irq_hw_number_t hwirq; in irq_create_fwspec_mapping() local
832 if (irq_domain_translate(domain, fwspec, &hwirq, &type)) in irq_create_fwspec_mapping()
848 virq = irq_find_mapping(domain, hwirq); in irq_create_fwspec_mapping()
874 hwirq, of_node_full_name(to_of_node(fwspec->fwnode))); in irq_create_fwspec_mapping()
888 virq = irq_create_mapping_affinity_locked(domain, hwirq, NULL); in irq_create_fwspec_mapping()
953 irq_hw_number_t hwirq, in __irq_resolve_mapping() argument
966 if (hwirq < domain->hwirq_max) { in __irq_resolve_mapping()
967 data = irq_domain_get_irq_data(domain, hwirq); in __irq_resolve_mapping()
968 if (data && data->hwirq == hwirq) in __irq_resolve_mapping()
971 *irq = hwirq; in __irq_resolve_mapping()
979 if (hwirq < domain->revmap_size) in __irq_resolve_mapping()
980 data = rcu_dereference(domain->revmap[hwirq]); in __irq_resolve_mapping()
982 data = radix_tree_lookup(&domain->revmap_tree, hwirq); in __irq_resolve_mapping()
1101 int irq_domain_alloc_descs(int virq, unsigned int cnt, irq_hw_number_t hwirq, in irq_domain_alloc_descs() argument
1110 hint = hwirq % nr_irqs; in irq_domain_alloc_descs()
1130 irq_data->hwirq = 0; in irq_domain_reset_irq_data()
1185 irq_domain_set_mapping(domain, data->hwirq, data); in irq_domain_insert_irq()
1206 irq_hw_number_t hwirq = data->hwirq; in irq_domain_remove_irq() local
1209 irq_domain_clear_mapping(domain, hwirq); in irq_domain_remove_irq()
1384 irq_hw_number_t hwirq, in irq_domain_set_hwirq_and_chip() argument
1393 irq_data->hwirq = hwirq; in irq_domain_set_hwirq_and_chip()
1413 irq_hw_number_t hwirq, const struct irq_chip *chip, in irq_domain_set_info() argument
1417 irq_domain_set_hwirq_and_chip(domain, virq, hwirq, chip, chip_data); in irq_domain_set_info()
1588 if (d->hwirq < d->domain->revmap_size) { in irq_domain_fix_revmap()
1590 rcu_assign_pointer(d->domain->revmap[d->hwirq], d); in irq_domain_fix_revmap()
1592 slot = radix_tree_lookup_slot(&d->domain->revmap_tree, d->hwirq); in irq_domain_fix_revmap()
1661 root_irq_data->hwirq = 0; in irq_domain_push_irq()
1675 irq_domain_set_mapping(domain, root_irq_data->hwirq, root_irq_data); in irq_domain_push_irq()
1737 irq_domain_clear_mapping(domain, root_irq_data->hwirq); in irq_domain_pop_irq()
1927 irq_hw_number_t hwirq, const struct irq_chip *chip, in irq_domain_set_info() argument