• Herve Codina's avatar
    irqdomain: Add support for generic irq chips creation before publishing a domain · e6f67ce3
    Herve Codina authored
    The current API functions create an irq_domain and also publish this
    newly created to domain. Once an irq_domain is published, consumers can
    request IRQ in order to use them.
    
    Some interrupt controller drivers have to perform some more operations
    with the created irq_domain in order to have it ready to be used.
    For instance:
       - Allocate generic irq chips with irq_alloc_domain_generic_chips()
       - Retrieve the generic irq chips with irq_get_domain_generic_chip()
       - Initialize retrieved chips: set register base address and offsets,
         set several hooks such as irq_mask, irq_unmask, ...
    
    With the newly introduced irq_domain_alloc_generic_chips(), an interrupt
    controller driver can use the irq_domain_chip_generic_info structure and
    set the init() hook to perform its generic chips initialization.
    
    In order to avoid a window where the domain is published but not yet
    ready to be used, handle the generic chip creation (i.e the
    irq_domain_alloc_generic_chips() call) before the domain is published.
    Suggested-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Signed-off-by: default avatarHerve Codina <herve.codina@bootlin.com>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Link: https://lore.kernel.org/r/20240614173232.1184015-16-herve.codina@bootlin.com
    e6f67ce3
irqdomain.c 57.8 KB