Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

genirq: Add generic_handle_domain_irq() helper

Provide generic_handle_domain_irq() as a pendent to handle_domain_irq()
for non-root interrupt controllers

Signed-off-by: Marc Zyngier <maz@kernel.org>

+20 -1
+2
include/linux/irqdesc.h
··· 170 170 int __handle_domain_irq(struct irq_domain *domain, unsigned int hwirq, 171 171 bool lookup, struct pt_regs *regs); 172 172 173 + int generic_handle_domain_irq(struct irq_domain *domain, unsigned int hwirq); 174 + 173 175 static inline int handle_domain_irq(struct irq_domain *domain, 174 176 unsigned int hwirq, struct pt_regs *regs) 175 177 {
+18 -1
kernel/irq/irqdesc.c
··· 661 661 662 662 #ifdef CONFIG_HANDLE_DOMAIN_IRQ 663 663 /** 664 - * __handle_domain_irq - Invoke the handler for a HW irq belonging to a domain 664 + * generic_handle_domain_irq - Invoke the handler for a HW irq belonging 665 + * to a domain, usually for a non-root interrupt 666 + * controller 667 + * @domain: The domain where to perform the lookup 668 + * @hwirq: The HW irq number to convert to a logical one 669 + * 670 + * Returns: 0 on success, or -EINVAL if conversion has failed 671 + * 672 + */ 673 + int generic_handle_domain_irq(struct irq_domain *domain, unsigned int hwirq) 674 + { 675 + return handle_irq_desc(irq_resolve_mapping(domain, hwirq)); 676 + } 677 + EXPORT_SYMBOL_GPL(generic_handle_domain_irq); 678 + 679 + /** 680 + * __handle_domain_irq - Invoke the handler for a HW irq belonging to a domain, 681 + * usually for a root interrupt controller 665 682 * @domain: The domain where to perform the lookup 666 683 * @hwirq: The HW irq number to convert to a logical one 667 684 * @lookup: Whether to perform the domain lookup or not