linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch irqdomain: Enhance irq_domain_free_irqs_common() to support parentless irqdomain
@ 2014-11-21  3:23 Jiang Liu
  2014-11-23 10:33 ` Thomas Gleixner
  0 siblings, 1 reply; 4+ messages in thread
From: Jiang Liu @ 2014-11-21  3:23 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Grant Likely, Marc Zyngier,
	Yijing Wang, Yingjoe Chen, Suravee Suthikulpanit, Borislav Petkov,
	H. Peter Anvin, Benjamin Herrenschmidt, Matthias Brugger
  Cc: Jiang Liu, Tony Luck, linux-kernel, linux-pci, linux-arm-kernel

Originally irq_domain_free_irqs_common() is designed to be used by
irqdomains with parent. But there are desires to reuse for parentless
irqdomains for code reduction.
So check domain->parent before invoking irq_domain_free_irqs_parent().

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
---
Hi Thomas,
	This patch applies to tip/irq/irqdomain, it helps to reduce code
size on ARM. Seems we still have chance to merge it into tip/irq/irqdomain:)
Regards!
Gerry
---
 kernel/irq/irqdomain.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 029acf11efed..0449d2869e17 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -975,7 +975,8 @@ void irq_domain_free_irqs_common(struct irq_domain *domain, unsigned int virq,
 		if (irq_data)
 			irq_domain_reset_irq_data(irq_data);
 	}
-	irq_domain_free_irqs_parent(domain, virq, nr_irqs);
+	if (domain->parent)
+		irq_domain_free_irqs_parent(domain, virq, nr_irqs);
 }
 
 /**
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-11-23 13:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-21  3:23 [Patch irqdomain: Enhance irq_domain_free_irqs_common() to support parentless irqdomain Jiang Liu
2014-11-23 10:33 ` Thomas Gleixner
2014-11-23 10:36   ` Thomas Gleixner
2014-11-23 13:28     ` Jiang Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).