[PATCH] genirq: ia64 irq: Dynamic irq support

[akpm@osdl.org: build fix]
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rajesh Shah <rajesh.shah@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Eric W. Biederman 2006-10-04 02:16:38 -07:00 committed by Linus Torvalds
parent 3a16d71362
commit b6cf2583ba
1 changed files with 20 additions and 0 deletions

View File

@ -30,6 +30,7 @@
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <linux/threads.h> #include <linux/threads.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/irq.h>
#include <asm/delay.h> #include <asm/delay.h>
#include <asm/intrinsics.h> #include <asm/intrinsics.h>
@ -105,6 +106,25 @@ reserve_irq_vector (int vector)
return test_and_set_bit(pos, ia64_vector_mask); return test_and_set_bit(pos, ia64_vector_mask);
} }
/*
* Dynamic irq allocate and deallocation for MSI
*/
int create_irq(void)
{
int vector = assign_irq_vector(AUTO_ASSIGN);
if (vector >= 0)
dynamic_irq_init(vector);
return vector;
}
void destroy_irq(unsigned int irq)
{
dynamic_irq_cleanup(irq);
free_irq_vector(irq);
}
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
# define IS_RESCHEDULE(vec) (vec == IA64_IPI_RESCHEDULE) # define IS_RESCHEDULE(vec) (vec == IA64_IPI_RESCHEDULE)
#else #else