Another proper interface to replace Xen hackery. No idea why Xen needs this, but I'm not masochistic enough to understand that mess. Not-Yet-Signed-off-by: Thomas Gleixner Cc: Konrad Rzeszutek Wilk --- kernel/irq/irqdesc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) Index: tip/kernel/irq/irqdesc.c =================================================================== --- tip.orig/kernel/irq/irqdesc.c +++ tip/kernel/irq/irqdesc.c @@ -390,6 +390,17 @@ err: EXPORT_SYMBOL_GPL(__irq_alloc_descs); /** + * irq_is_allocated - query whether an irq desc is allocated for an irq number + * @irq: irq number + * + * Returns a momentary racy snapshot of the allocation state + */ +bool irq_is_allocated(unsigned int irq) +{ + return irq < nr_irqs && test_bit(irq, allocated_irqs); +} + +/** * irq_reserve_irqs - mark irqs allocated * @from: mark from irq number * @cnt: number of irqs to mark -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/