summaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2012-06-04 07:04:36 +0200
committerGrant Likely <grant.likely@secretlab.ca>2012-07-11 17:15:34 +0200
commit2a71a1a9da40dfbd5b23d4312aa1641385581f4a (patch)
tree9a246c0aa997d98acb9a931e10331468a3661ac0 /kernel/irq
parentirqdomain: Split disassociating code into separate function (diff)
downloadlinux-2a71a1a9da40dfbd5b23d4312aa1641385581f4a.tar.xz
linux-2a71a1a9da40dfbd5b23d4312aa1641385581f4a.zip
irqdomain: Always update revmap when setting up a virq
At irq_setup_virq() time all of the data needed to update the reverse map is available, but the current code ignores it and relies upon the slow path to insert revmap records. This patch adds revmap updating to the setup path so the slow path will no longer be necessary. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Rob Herring <rob.herring@calxeda.com>
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/irqdomain.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 17634f2c9f6c..091732c9dbdc 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -424,6 +424,18 @@ static int irq_setup_virq(struct irq_domain *domain, unsigned int virq,
return -1;
}
+ switch (domain->revmap_type) {
+ case IRQ_DOMAIN_MAP_LINEAR:
+ if (hwirq < domain->revmap_data.linear.size)
+ domain->revmap_data.linear.revmap[hwirq] = virq;
+ break;
+ case IRQ_DOMAIN_MAP_TREE:
+ mutex_lock(&revmap_trees_mutex);
+ irq_radix_revmap_insert(domain, virq, hwirq);
+ mutex_unlock(&revmap_trees_mutex);
+ break;
+ }
+
irq_clear_status_flags(virq, IRQ_NOREQUEST);
return 0;