]> www.infradead.org Git - linux.git/commit
genirq/generic_chip: Introduce init() and exit() hooks
authorHerve Codina <herve.codina@bootlin.com>
Fri, 14 Jun 2024 17:32:15 +0000 (19:32 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 17 Jun 2024 13:48:14 +0000 (15:48 +0200)
commitfea922ee9f8ffd3c2a8e8dfbc68de42905a3982a
treede3bc75ac6cd6d3d5c560ba7d5a5c391b826b3d0
parente25f553a92973eaf59ff3a00fe7f61ab01b2877f
genirq/generic_chip: Introduce init() and exit() hooks

Most of generic chip drivers need to perform some more additional
initializations on the generic chips allocated before they can be fully
ready.

These additional initializations need to be performed before the IRQ
domain is published to avoid a race condition between IRQ consumers and
suppliers.

Introduce the init() hook to perform these initializations at the right
place just after the generic chip creation. Also introduce the exit() hook
to allow reverting operations done by the init() hook just before the
generic chip is destroyed.

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-15-herve.codina@bootlin.com
include/linux/irq.h
kernel/irq/generic-chip.c