aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irq.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-05-07 11:44:05 -0400
committerThomas Gleixner <tglx@linutronix.de>2014-05-16 08:05:18 -0400
commit7b6ef1262549f6afc5c881aaef80beb8fd15f908 (patch)
treec773a3d7dc6fcaa5aa9ba35074312f728d7dce40 /include/linux/irq.h
parent465665f78a7f47d46d7fe18195f3548b4911547f (diff)
genirq: Provide generic hwirq allocation facility
Not really the solution to the problem, but at least it confines the mess in the core code and allows to get rid of the create/destroy_irq variants from hell, i.e. 3 implementations with different semantics plus the x86 specific variants __create_irqs and create_irq_nr which have been invented in another circle of hell. x86 : x86 should be converted to irq domains and I'm deliberately making it impossible to do the multi-vector MSI support by adding more crap to the current mess. It's not that hard to do and I'm really tired of the trainwrecks which have been invented by baindaid engineering so far. Any attempt to do multi-vector MSI or ioapic hotplug without converting to irq domains is NAKed hereby. tile: Might use irq domains as well, but it has a very limited interrupt space, so handling it via this functionality might be the right thing to do even in the long run. ia64: That's an hopeless case, as I doubt that anyone has the stomach to rewrite the homebrewn dynamic allocation facilities. I stared at it for a couple of hours and gave up. The create/destroy_irq mess could be made private to itanic right away if there wouldn't be the iommu/dmar driver being shared with x86. So to do that I'm going to add a separate ia64 specific implementation later in order not to deep-six itanic right away. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Grant Likely <grant.likely@linaro.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: x86@kernel.org Link: http://lkml.kernel.org/r/20140507154334.208629358@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r--include/linux/irq.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 5c57efb863d0..c75dd161d37f 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -637,6 +637,21 @@ static inline int irq_reserve_irq(unsigned int irq)
637 return irq_reserve_irqs(irq, 1); 637 return irq_reserve_irqs(irq, 1);
638} 638}
639 639
640#ifdef CONFIG_GENERIC_IRQ_LEGACY_ALLOC_HWIRQ
641unsigned int irq_alloc_hwirqs(int cnt, int node);
642static inline unsigned int irq_alloc_hwirq(int node)
643{
644 return irq_alloc_hwirqs(1, node);
645}
646void irq_free_hwirqs(unsigned int from, int cnt);
647static inline void irq_free_hwirq(unsigned int irq)
648{
649 return irq_free_hwirqs(irq, 1);
650}
651int arch_setup_hwirq(unsigned int irq, int node);
652void arch_teardown_hwirq(unsigned int irq);
653#endif
654
640#ifndef irq_reg_writel 655#ifndef irq_reg_writel
641# define irq_reg_writel(val, addr) writel(val, addr) 656# define irq_reg_writel(val, addr) writel(val, addr)
642#endif 657#endif