Skip to content

Commit 8240ef5

Browse files
author
Marc Zyngier
committed
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 <[email protected]>
1 parent 9e027dd commit 8240ef5

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

include/linux/irqdesc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ int generic_handle_irq(unsigned int irq);
170170
int __handle_domain_irq(struct irq_domain *domain, unsigned int hwirq,
171171
bool lookup, struct pt_regs *regs);
172172

173+
int generic_handle_domain_irq(struct irq_domain *domain, unsigned int hwirq);
174+
173175
static inline int handle_domain_irq(struct irq_domain *domain,
174176
unsigned int hwirq, struct pt_regs *regs)
175177
{

kernel/irq/irqdesc.c

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,24 @@ EXPORT_SYMBOL_GPL(generic_handle_irq);
661661

662662
#ifdef CONFIG_HANDLE_DOMAIN_IRQ
663663
/**
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
665682
* @domain: The domain where to perform the lookup
666683
* @hwirq: The HW irq number to convert to a logical one
667684
* @lookup: Whether to perform the domain lookup or not

0 commit comments

Comments
 (0)