lkml.org 
[lkml]   [2012]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 02/12] irqdomain: Always update revmap when setting up a virq
Date
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>
---
kernel/irq/irqdomain.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 4161d2a..5c36722 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -393,6 +393,16 @@ 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:
+ irq_radix_revmap_insert(domain, virq, hwirq);
+ break;
+ }
+
irq_clear_status_flags(virq, IRQ_NOREQUEST);

return 0;
--
1.7.9.5


\
 
 \ /
  Last update: 2012-06-16 08:02    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site