summaryrefslogtreecommitdiff
path: root/include/linux/irq.h
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-08-19 20:50:10 -0700
committerIngo Molnar <mingo@elte.hu>2008-10-16 16:52:32 +0200
commit9059d8fa4a3a9153da53da890039f7f956cc9d19 (patch)
tree142f12d7843a4000eb9be7dd8a4a933ce2955f72 /include/linux/irq.h
parent7f95ec9e4c12fd067febfd57532da1166d75d858 (diff)
irq: add irq_desc_without_new
add an irq_desc accessor that will not allocate any sparse entry but returns failure if there's no entry present. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r--include/linux/irq.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index cbf471aee1ce..c9ffef7c3b44 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -191,10 +191,23 @@ struct irq_desc {
} ____cacheline_internodealigned_in_smp;
extern struct irq_desc *irq_to_desc(unsigned int irq);
+extern struct irq_desc *__irq_to_desc(unsigned int irq);
+
+#ifndef CONFIG_HAVE_SPARSE_IRQ
+
#ifndef CONFIG_HAVE_DYN_ARRAY
/* could be removed if we get rid of all irq_desc reference */
extern struct irq_desc irq_desc[NR_IRQS];
+#else
+extern struct irq_desc *irq_desc;
#endif
+
+#else
+
+extern struct irq_desc *sparse_irqs;
+
+#endif
+
#define kstat_irqs_this_cpu(DESC) \
((DESC)->kstat_irqs[smp_processor_id()])