diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2014-05-07 11:44:13 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2014-05-16 08:05:20 -0400 |
commit | 6ef40512c55b18f8fdf1074b2f2d7eadcd50fec7 (patch) | |
tree | 37b930d343fb86e9625799cf1c94a1009b0aceda /arch/tile | |
parent | 54859f59fc18e5c104a4095420b3fcef8bc3ae63 (diff) |
tile: Implement irq_alloc/free_hwirq() for migration
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@linutronix.de>
Reviewed-by: Grant Likely <grant.likely@linaro.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
Link: http://lkml.kernel.org/r/20140507154336.947853241@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/tile')
-rw-r--r-- | arch/tile/include/asm/irq.h | 3 | ||||
-rw-r--r-- | arch/tile/kernel/irq.c | 12 |
2 files changed, 15 insertions, 0 deletions
diff --git a/arch/tile/include/asm/irq.h b/arch/tile/include/asm/irq.h index 33cff9a3058b..9670a39d924d 100644 --- a/arch/tile/include/asm/irq.h +++ b/arch/tile/include/asm/irq.h | |||
@@ -76,4 +76,7 @@ void tile_irq_activate(unsigned int irq, int tile_irq_type); | |||
76 | 76 | ||
77 | void setup_irq_regs(void); | 77 | void setup_irq_regs(void); |
78 | 78 | ||
79 | unsigned int irq_alloc_hwirq(int node); | ||
80 | void irq_free_hwirq(unsigned int irq); | ||
81 | |||
79 | #endif /* _ASM_TILE_IRQ_H */ | 82 | #endif /* _ASM_TILE_IRQ_H */ |
diff --git a/arch/tile/kernel/irq.c b/arch/tile/kernel/irq.c index 906a76bdb31d..5fd197e0a2d4 100644 --- a/arch/tile/kernel/irq.c +++ b/arch/tile/kernel/irq.c | |||
@@ -312,4 +312,16 @@ void destroy_irq(unsigned int irq) | |||
312 | spin_unlock_irqrestore(&available_irqs_lock, flags); | 312 | spin_unlock_irqrestore(&available_irqs_lock, flags); |
313 | } | 313 | } |
314 | EXPORT_SYMBOL(destroy_irq); | 314 | EXPORT_SYMBOL(destroy_irq); |
315 | |||
316 | unsigned int irq_alloc_hwirq(int node) | ||
317 | { | ||
318 | int ret = create_irq(); | ||
319 | return ret < 0 ? 0 : ret; | ||
320 | } | ||
321 | |||
322 | void irq_free_hwirq(unsigned int irq) | ||
323 | { | ||
324 | destroy_irq(irq); | ||
325 | } | ||
326 | |||
315 | #endif | 327 | #endif |