• Linus Walleij's avatar
    irqdomain: augment add_simple() to allocate descs · 2854d167
    Linus Walleij authored
    Currently we rely on all IRQ chip instances to dynamically
    allocate their IRQ descriptors unless they use the linear
    IRQ domain. So for irqdomain_add_legacy() and
    irqdomain_add_simple() the caller need to make sure that
    descriptors are allocated.
    
    Let's slightly augment the yet unused irqdomain_add_simple()
    to also allocate descriptors as a means to simplify usage
    and avoid code duplication throughout the kernel.
    
    We warn if descriptors cannot be allocated, e.g. if a
    platform has the bad habit of hogging descriptors at boot
    time.
    
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Grant Likely <grant.likely@secretlab.ca>
    Cc: Paul Mundt <lethal@linux-sh.org>
    Cc: Russell King <linux@arm.linux.org.uk>
    Cc: Lee Jones <lee.jones@linaro.org>
    Reviewed-by: default avatarRob Herring <rob.herring@calxeda.com>
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    2854d167
irqdomain.c 25.5 KB