irqdomain: Eliminate revmap type
authorGrant Likely <grant.likely@linaro.org>
Sat, 8 Jun 2013 11:03:59 +0000 (12:03 +0100)
committerGrant Likely <grant.likely@linaro.org>
Mon, 10 Jun 2013 10:52:09 +0000 (11:52 +0100)
commit1aa0dd94ca07df818cf14588c9031ab1d7fd84d3
tree9305dbac0984fdb76677bf558f545f716d737f40
parentcef5075c8c238ffd04c86a77a5a9bdbd18031137
irqdomain: Eliminate revmap type

The NOMAP irq_domain type is only used by a handful of interrupt
controllers and it unnecessarily complicates the code by adding special
cases on how to look up mappings and different revmap functions are used
for each type which need to validate the correct type is passed to it
before performing the reverse map. Eliminating the revmap_type and
making a single reverse mapping function simplifies the code. It also
shouldn't be any slower than having separate revmap functions because
the type of the revmap needed to be checked anyway.

The linear and tree revmap types were already merged in a previous
patch. This patch rolls the NOMAP or direct mapping behaviour into the
same domain code making is possible for an irq domain to do any mapping
type; linear, tree or direct; and that the mapping will be transparent
to the interrupt controller driver.

With this change, direct mappings will get stored in the linear or tree
mapping for consistency. Reverse mapping from the hwirq to virq will go
through the normal lookup process. However, any controller using a
direct mapping can take advantage of knowing that hwirq==virq for any
mapped interrupts skip doing a revmap lookup when handling IRQs.

Signed-off-by: Grant Likely <grant.likely@linaro.org>
include/linux/irqdomain.h
kernel/irq/generic-chip.c
kernel/irq/irqdomain.c
This page took 0.043557 seconds and 5 git commands to generate.