genirq/generic_chip: Introduce irq_domain_{alloc,remove}_generic_chips()
authorHerve Codina <herve.codina@bootlin.com>
Fri, 14 Jun 2024 17:32:14 +0000 (19:32 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 17 Jun 2024 13:48:14 +0000 (15:48 +0200)
commite25f553a92973eaf59ff3a00fe7f61ab01b2877f
tree5a32425dd80b3fc6f734deb7e665a2842733716a
parent44b68de9b8e3dfde12308e8567548799d7ded0de
genirq/generic_chip: Introduce irq_domain_{alloc,remove}_generic_chips()

The existing __irq_alloc_domain_generic_chips() uses a bunch of parameters
to describe the generic chips that need to be allocated.

Adding more parameters and wrappers to hide new parameters in the existing
code leads to more and more code without any relevant values and without
any flexibility.

Introduce irq_domain_alloc_generic_chips() where the generic chips
description is done using the irq_domain_chip_generic_info structure
instead of the bunch of parameters to allow flexibility and easy evolution.

Also introduce irq_domain_remove_generic_chips() to revert the operations
done by irq_domain_alloc_generic_chips().

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240614173232.1184015-14-herve.codina@bootlin.com
include/linux/irq.h
kernel/irq/generic-chip.c