sh: intc: dynamic IRQ support.
authorPaul Mundt <lethal@linux-sh.org>
Mon, 2 Nov 2009 01:30:26 +0000 (10:30 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 2 Nov 2009 01:30:26 +0000 (10:30 +0900)
commit1ce7b039b5029ab698f9d64c0ad603794bc31ae7
treed116ee849d48b470730ff209125e7ce3d2315582
parent58ee987e2fd8acff6263d194d8fa43267cc8b1c9
sh: intc: dynamic IRQ support.

This adds support for dynamic IRQ allocation/deallocation for all parts
using the SH-style vectored IRQs. While this is not inherently
INTC-specific, the INTC code is the main tie-in for vectored IRQ
registration, and is the only place that a full view of the utilized
vector map is possible.

The implementation is fairly straightforward, implementing a flat IRQ map
where each registered vector is reserved, allowing us to scan for holes
and dynamically wire up IRQs lazily later on in the boot stage. This
piggybacks on top of sparseirq in order to make the best use of the
available vector space.

Dynamic IRQs can be used for any number of things, ranging from MSI in
the SH-X3 PCIe case down to demux vectors for board FPGAs and system
controllers that presently allocate an arbitrary range. In the latter
case, this also allows those platforms to use sparseirq without blowing
up, which brings us one step closer to enabling sparseirq as the default
for all platform and CPU combinations.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/sh/intc.c