irqdomain: eliminate slow-path revmap lookups
authorGrant Likely <grant.likely@secretlab.ca>
Mon, 4 Jun 2012 05:04:39 +0000 (22:04 -0700)
committerGrant Likely <grant.likely@secretlab.ca>
Wed, 25 Jul 2012 04:37:23 +0000 (22:37 -0600)
commit4c0946c47463defa681b83294383dc996d255bb7
tree97443f85088db0aac64bda73d3e7e4d2261623ba
parent6aeea3ecc33b1f36dbc3b80461d15a7052ae424f
irqdomain: eliminate slow-path revmap lookups

With the current state of irq_domain, the reverse map is always updated
when new IRQs get mapped.  This means that the irq_find_mapping() function
can be simplified to execute the revmap lookup functions unconditionally

This patch adds lookup functions for the revmaps that don't yet have one
and removes the slow path lookup code path.

v8: Broke out unrelated changes into separate patches.  Rebased on Paul's irq
    association patches.
v7: Rebased to irqdomain/next for v3.4 and applied before the removal of 'hint'
v6: Remove the slow path entirely.  The only place where the slow path
    could get called is for a linear mapping if the hwirq number is larger
    than the linear revmap size.  There shouldn't be any interrupt
    controllers that do that.
v5: rewrite to not use a ->revmap() callback.  It is simpler, smaller,
    safer and faster to open code each of the revmap lookups directly into
    irq_find_mapping() via a switch statement.
v4: Fix build failure on incorrect variable reference.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Milton Miller <miltonm@bga.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Rob Herring <rob.herring@calxeda.com>
kernel/irq/irqdomain.c