Skip to content

Commit 6f194c9

Browse files
Xu QiangMarc Zyngier
authored andcommitted
irqdomain: Report irq number for NOMAP domains
When using a NOMAP domain, __irq_resolve_mapping() doesn't store the Linux IRQ number at the address optionally provided by the caller. While this isn't a huge deal (the returned value is guaranteed to the hwirq that was passed as a parameter), let's honour the letter of the API by writing the expected value. Fixes: d22558d (“irqdomain: Introduce irq_resolve_mapping()”) Signed-off-by: Xu Qiang <xuqiang36@huawei.com> [maz: commit message] Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20220719063641.56541-2-xuqiang36@huawei.com
1 parent 2951717 commit 6f194c9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/irq/irqdomain.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,8 @@ struct irq_desc *__irq_resolve_mapping(struct irq_domain *domain,
910910
data = irq_domain_get_irq_data(domain, hwirq);
911911
if (data && data->hwirq == hwirq)
912912
desc = irq_data_to_desc(data);
913+
if (irq && desc)
914+
*irq = hwirq;
913915
}
914916

915917
return desc;

0 commit comments

Comments
 (0)