[RFC patch 7/8] fixup 2/2: genirq: generic chip: Add linear irq domain support

Sebastian Hesselbarth sebastian.hesselbarth at gmail.com
Mon May 6 22:32:13 EST 2013


mask_cache pointer also needs to be initialized for domain generic
chips.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth at gmail.com>
---
Cc: Thomas Gleixner <tglx at linutronix.de>
Cc: Russell King - ARM Linux <linux at arm.linux.org.uk>
Cc: Grant Likely <grant.likely at linaro.org>
Cc: Rob Herring <rob.herring at calxeda.com>
Cc: Rob Landley <rob at landley.net>
Cc: Arnd Bergmann <arnd at arndb.de>
Cc: Jason Cooper <jason at lakedaemon.net>
Cc: Andrew Lunn <andrew at lunn.ch>
Cc: Jason Gunthorpe <jgunthorpe at obsidianresearch.com>
Cc: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Cc: Gregory Clement <gregory.clement at free-electrons.com>
Cc: Ezequiel Garcia <ezequiel.garcia at free-electrons.com>
Cc: Maxime Ripard <maxime.ripard at free-electrons.com>
Cc: Jean-Francois Moine <moinejf at free.fr>
Cc: Gerlando Falauto <gerlando.falauto at keymile.com>
Cc: Uwe Kleine-Koenig <u.kleine-koenig at pengutronix.de>
Cc: devicetree-discuss at lists.ozlabs.org
Cc: linux-doc at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-kernel at vger.kernel.org
---
 kernel/irq/generic-chip.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/kernel/irq/generic-chip.c b/kernel/irq/generic-chip.c
index 3dbfe2e..3e0312f 100644
--- a/kernel/irq/generic-chip.c
+++ b/kernel/irq/generic-chip.c
@@ -275,12 +275,22 @@ int irq_alloc_domain_generic_chips(struct irq_domain *d, int irqs_per_chip,
 
 	p += sizeof(*dgc) + numchips * sizeof(void *);
 	for (i = 0; i < numchips; i++) {
+		int k;
+
 		gc = (struct irq_chip_generic *)p;
 		dgc->gc[i] = gc;
 		irq_init_generic_chip(gc, name, num_ct, i * irqs_per_chip,
 				      NULL, handler);
 		gc->domain = d;
 
+		for (k = 0; k < gc->num_ct; k++) {
+			struct irq_chip_type *ct = &gc->chip_types[k];
+			if (gcflags & IRQ_GC_MASK_CACHE_PER_TYPE)
+				ct->mask_cache = &ct->mask_cache_priv;
+			else
+				ct->mask_cache = &gc->mask_cache;
+		}
+
 		raw_spin_lock_irqsave(&gc_lock, flags);
 		list_add_tail(&gc->list, &gc_list);
 		raw_spin_unlock_irqrestore(&gc_lock, flags);
-- 
1.7.2.5



More information about the devicetree-discuss mailing list