diff options
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r-- | include/linux/irq.h | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index 98564dc64476..d64a6d49bdef 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -193,42 +193,23 @@ struct irq_desc { | |||
193 | const char *name; | 193 | const char *name; |
194 | } ____cacheline_internodealigned_in_smp; | 194 | } ____cacheline_internodealigned_in_smp; |
195 | 195 | ||
196 | extern void early_irq_init(void); | ||
197 | extern void arch_early_irq_init(void); | ||
198 | extern void arch_init_chip_data(struct irq_desc *desc, int cpu); | ||
199 | extern void arch_init_copy_chip_data(struct irq_desc *old_desc, | 196 | extern void arch_init_copy_chip_data(struct irq_desc *old_desc, |
200 | struct irq_desc *desc, int cpu); | 197 | struct irq_desc *desc, int cpu); |
201 | extern void arch_free_chip_data(struct irq_desc *old_desc, struct irq_desc *desc); | 198 | extern void arch_free_chip_data(struct irq_desc *old_desc, struct irq_desc *desc); |
202 | 199 | ||
203 | #ifndef CONFIG_SPARSE_IRQ | 200 | #ifndef CONFIG_SPARSE_IRQ |
204 | extern struct irq_desc irq_desc[NR_IRQS]; | 201 | extern struct irq_desc irq_desc[NR_IRQS]; |
205 | 202 | #else /* CONFIG_SPARSE_IRQ */ | |
206 | static inline struct irq_desc *irq_to_desc(unsigned int irq) | ||
207 | { | ||
208 | return (irq < NR_IRQS) ? irq_desc + irq : NULL; | ||
209 | } | ||
210 | static inline struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu) | ||
211 | { | ||
212 | return irq_to_desc(irq); | ||
213 | } | ||
214 | |||
215 | #else | ||
216 | |||
217 | extern struct irq_desc *irq_to_desc(unsigned int irq); | ||
218 | extern struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu); | ||
219 | extern struct irq_desc *move_irq_desc(struct irq_desc *old_desc, int cpu); | 203 | extern struct irq_desc *move_irq_desc(struct irq_desc *old_desc, int cpu); |
220 | 204 | ||
221 | # define for_each_irq_desc(irq, desc) \ | ||
222 | for (irq = 0, desc = irq_to_desc(irq); irq < nr_irqs; irq++, desc = irq_to_desc(irq)) | ||
223 | # define for_each_irq_desc_reverse(irq, desc) \ | ||
224 | for (irq = nr_irqs - 1, desc = irq_to_desc(irq); irq >= 0; irq--, desc = irq_to_desc(irq)) | ||
225 | |||
226 | #define kstat_irqs_this_cpu(DESC) \ | 205 | #define kstat_irqs_this_cpu(DESC) \ |
227 | ((DESC)->kstat_irqs[smp_processor_id()]) | 206 | ((DESC)->kstat_irqs[smp_processor_id()]) |
228 | #define kstat_incr_irqs_this_cpu(irqno, DESC) \ | 207 | #define kstat_incr_irqs_this_cpu(irqno, DESC) \ |
229 | ((DESC)->kstat_irqs[smp_processor_id()]++) | 208 | ((DESC)->kstat_irqs[smp_processor_id()]++) |
230 | 209 | ||
231 | #endif | 210 | #endif /* CONFIG_SPARSE_IRQ */ |
211 | |||
212 | extern struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu); | ||
232 | 213 | ||
233 | static inline struct irq_desc * | 214 | static inline struct irq_desc * |
234 | irq_remap_to_desc(unsigned int irq, struct irq_desc *desc) | 215 | irq_remap_to_desc(unsigned int irq, struct irq_desc *desc) |