[patch 15/32] tile: Implement irq_alloc/free_hwirq() for migration
From: Thomas Gleixner
Date: Wed May 07 2014 - 11:46:31 EST
We want to convert the drivers over to the new interface and finally
tile to sparse irqs. Implement irq_alloc/free_hwirq() for step by step
migration.
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Chris Metcalf <cmetcalf@xxxxxxxxxx>
---
arch/tile/include/asm/irq.h | 3 +++
arch/tile/kernel/irq.c | 12 ++++++++++++
2 files changed, 15 insertions(+)
Index: tip/arch/tile/include/asm/irq.h
===================================================================
--- tip.orig/arch/tile/include/asm/irq.h
+++ tip/arch/tile/include/asm/irq.h
@@ -76,4 +76,7 @@ void tile_irq_activate(unsigned int irq,
void setup_irq_regs(void);
+unsigned int irq_alloc_hwirq(int node);
+void irq_free_hwirq(unsigned int irq);
+
#endif /* _ASM_TILE_IRQ_H */
Index: tip/arch/tile/kernel/irq.c
===================================================================
--- tip.orig/arch/tile/kernel/irq.c
+++ tip/arch/tile/kernel/irq.c
@@ -312,4 +312,16 @@ void destroy_irq(unsigned int irq)
spin_unlock_irqrestore(&available_irqs_lock, flags);
}
EXPORT_SYMBOL(destroy_irq);
+
+unsigned int irq_alloc_hwirq(int node)
+{
+ int ret = create_irq();
+ return ret < 0 ? 0 : ret;
+}
+
+void irq_free_hwirq(unsigned int irq)
+{
+ destroy_irq();
+}
+
#endif
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/