irqdomain: Refactor __irq_domain_alloc_irqs()
authorJohan Hovold <johan+linaro@kernel.org>
Mon, 13 Feb 2023 10:42:47 +0000 (11:42 +0100)
committerMarc Zyngier <maz@kernel.org>
Mon, 13 Feb 2023 19:31:24 +0000 (19:31 +0000)
commitd55f7f4c58c07beb5050a834bf57ae2ede599c7e
treeb5e82952f23b40aa2e35a35752664085242bcb55
parent6e6f75c9c98d2d246d90411ff2b6f0cd271f4cba
irqdomain: Refactor __irq_domain_alloc_irqs()

Refactor __irq_domain_alloc_irqs() so that it can be called internally
while holding the irq_domain_mutex.

This will be used to fix a shared-interrupt mapping race, hence the
Fixes tag.

Fixes: b62b2cf5759b ("irqdomain: Fix handling of type settings for existing mappings")
Cc: stable@vger.kernel.org # 4.8
Tested-by: Hsin-Yi Wang <hsinyi@chromium.org>
Tested-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230213104302.17307-6-johan+linaro@kernel.org
kernel/irq/irqdomain.c