vt8500: multiplatform for 3.8

Arnd Bergmann arnd at arndb.de
Sun Sep 23 08:35:24 EDT 2012

On Sunday 23 September 2012, Tony Prisk wrote:
> I just took a cursory look over the work required for enabling
> multiplatform support for v3.8 for arch-vt8500.
> There are 2 files I don't know what to do with in
> arch-vt8500/include/mach:
> 1) entry-macro.S
> Contains some low-level irq macro's.

The solution is to enable CONFIG_MULTI_IRQ_HANDLER (implied in
CONFIG_MULTIPLATFORM), and implement the same code in C, and then
set the .handle_irq callback in the your machine descriptor
to this function.
> 2) irqs.h
> Only contains '#define NR_IRQS 128' so I thought it would be easy enough
> to get rid of, but it looks like I need to enable SPARSE_IRQ to drop it,
> which will require some coding - what exactly is SPARSE_IRQ and what's
> required to make it work?

SPARSE_IRQ (in combination with IRQDOMAIN) removes the direct mapping
between hardware IRQ numbers and Linux IRQ numbers. You already have
IRQ domain support in the irq driver. If all IRQ numbers are parsed
from the device tree, you can convert this from legacy to linear domain
to cut the last ties (the local irq_cnt variable) and just set SPARSE_IRQ
without reserving any legacy interrupts. Some platforms put an nr_irqs
variable into the machine descriptor as an intermediate step, but I think
you don't even need that.


More information about the linux-arm-kernel mailing list