]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xen/events: drop xen_allocate_irqs_dynamic()
authorJuergen Gross <jgross@suse.com>
Wed, 27 Sep 2023 08:29:02 +0000 (10:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Mar 2024 12:34:57 +0000 (13:34 +0100)
commit40f14760da839620d5a1d257205a514aac0ac2b1
tree49c82bef1d8351517c352416cb8405bf47feec4b
parent666860d56d83a755f8148724e5bb59ee042db611
xen/events: drop xen_allocate_irqs_dynamic()

[ Upstream commit 5dd9ad32d7758b1a76742f394acf0eb3ac8a636a ]

Instead of having a common function for allocating a single IRQ or a
consecutive number of IRQs, split up the functionality into the callers
of xen_allocate_irqs_dynamic().

This allows to handle any allocation error in xen_irq_init() gracefully
instead of panicing the system. Let xen_irq_init() return the irq_info
pointer or NULL in case of an allocation error.

Additionally set the IRQ into irq_info already at allocation time, as
otherwise the IRQ would be '0' (which is a valid IRQ number) until
being set.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Stable-dep-of: fa765c4b4aed ("xen/events: close evtchn after mapping cleanup")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/xen/events/events_base.c