irqdomain: augment add_simple() to allocate descs
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 27 Sep 2012 12:59:39 +0000 (14:59 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 10 Oct 2012 06:57:26 +0000 (08:57 +0200)
commit2854d167cc545d0642277bf8b77f972a91146fc6
treea8b8a2083bdd6569093af1613adea259064a1bcb
parentc22df08c7ffbfb281b0e5dff3fff4e192d1a7863
irqdomain: augment add_simple() to allocate descs

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: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
kernel/irq/irqdomain.c
This page took 0.030295 seconds and 5 git commands to generate.