aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irq.h
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-08-19 23:50:10 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 10:52:32 -0400
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 {
191} ____cacheline_internodealigned_in_smp; 191} ____cacheline_internodealigned_in_smp;
192 192
193extern struct irq_desc *irq_to_desc(unsigned int irq); 193extern struct irq_desc *irq_to_desc(unsigned int irq);
194extern struct irq_desc *__irq_to_desc(unsigned int irq);
195
196#ifndef CONFIG_HAVE_SPARSE_IRQ
197
194#ifndef CONFIG_HAVE_DYN_ARRAY 198#ifndef CONFIG_HAVE_DYN_ARRAY
195/* could be removed if we get rid of all irq_desc reference */ 199/* could be removed if we get rid of all irq_desc reference */
196extern struct irq_desc irq_desc[NR_IRQS]; 200extern struct irq_desc irq_desc[NR_IRQS];
201#else
202extern struct irq_desc *irq_desc;
197#endif 203#endif
204
205#else
206
207extern struct irq_desc *sparse_irqs;
208
209#endif
210
198#define kstat_irqs_this_cpu(DESC) \ 211#define kstat_irqs_this_cpu(DESC) \
199 ((DESC)->kstat_irqs[smp_processor_id()]) 212 ((DESC)->kstat_irqs[smp_processor_id()])
200 213