static void xgene_gpio_sb_domain_free(struct irq_domain *domain, unsigned int virq, unsigned int nr_irqs) { struct irq_data *d; unsigned int i; for (i = 0; i < nr_irqs; i++) { d = irq_domain_get_irq_data(domain, virq + i); irq_domain_reset_irq_data(d); } }
/** * crossbar_domain_free - unmap/free a crossbar<->irq connection * @domain: domain of irq to unmap * @virq: virq number * @nr_irqs: number of irqs to free * * We do not maintain a use count of total number of map/unmap * calls for a particular irq to find out if a irq can be really * unmapped. This is because unmap is called during irq_dispose_mapping(irq), * after which irq is anyways unusable. So an explicit map has to be called * after that. */ static void crossbar_domain_free(struct irq_domain *domain, unsigned int virq, unsigned int nr_irqs) { int i; raw_spin_lock(&cb->lock); for (i = 0; i < nr_irqs; i++) { struct irq_data *d = irq_domain_get_irq_data(domain, virq + i); irq_domain_reset_irq_data(d); cb->irq_map[d->hwirq] = IRQ_FREE; cb->write(d->hwirq, cb->safe_map); } raw_spin_unlock(&cb->lock); }