aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irq.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r--include/linux/irq.h30
1 files changed, 6 insertions, 24 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 98564dc64476..f899b502f186 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -113,7 +113,8 @@ struct irq_chip {
113 void (*eoi)(unsigned int irq); 113 void (*eoi)(unsigned int irq);
114 114
115 void (*end)(unsigned int irq); 115 void (*end)(unsigned int irq);
116 void (*set_affinity)(unsigned int irq, cpumask_t dest); 116 void (*set_affinity)(unsigned int irq,
117 const struct cpumask *dest);
117 int (*retrigger)(unsigned int irq); 118 int (*retrigger)(unsigned int irq);
118 int (*set_type)(unsigned int irq, unsigned int flow_type); 119 int (*set_type)(unsigned int irq, unsigned int flow_type);
119 int (*set_wake)(unsigned int irq, unsigned int on); 120 int (*set_wake)(unsigned int irq, unsigned int on);
@@ -193,42 +194,23 @@ struct irq_desc {
193 const char *name; 194 const char *name;
194} ____cacheline_internodealigned_in_smp; 195} ____cacheline_internodealigned_in_smp;
195 196
196extern void early_irq_init(void);
197extern void arch_early_irq_init(void);
198extern void arch_init_chip_data(struct irq_desc *desc, int cpu);
199extern void arch_init_copy_chip_data(struct irq_desc *old_desc, 197extern void arch_init_copy_chip_data(struct irq_desc *old_desc,
200 struct irq_desc *desc, int cpu); 198 struct irq_desc *desc, int cpu);
201extern void arch_free_chip_data(struct irq_desc *old_desc, struct irq_desc *desc); 199extern void arch_free_chip_data(struct irq_desc *old_desc, struct irq_desc *desc);
202 200
203#ifndef CONFIG_SPARSE_IRQ 201#ifndef CONFIG_SPARSE_IRQ
204extern struct irq_desc irq_desc[NR_IRQS]; 202extern struct irq_desc irq_desc[NR_IRQS];
205 203#else /* CONFIG_SPARSE_IRQ */
206static inline struct irq_desc *irq_to_desc(unsigned int irq)
207{
208 return (irq < NR_IRQS) ? irq_desc + irq : NULL;
209}
210static 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
217extern struct irq_desc *irq_to_desc(unsigned int irq);
218extern struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu);
219extern struct irq_desc *move_irq_desc(struct irq_desc *old_desc, int cpu); 204extern struct irq_desc *move_irq_desc(struct irq_desc *old_desc, int cpu);
220 205
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) \ 206#define kstat_irqs_this_cpu(DESC) \
227 ((DESC)->kstat_irqs[smp_processor_id()]) 207 ((DESC)->kstat_irqs[smp_processor_id()])
228#define kstat_incr_irqs_this_cpu(irqno, DESC) \ 208#define kstat_incr_irqs_this_cpu(irqno, DESC) \
229 ((DESC)->kstat_irqs[smp_processor_id()]++) 209 ((DESC)->kstat_irqs[smp_processor_id()]++)
230 210
231#endif 211#endif /* CONFIG_SPARSE_IRQ */
212
213extern struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu);
232 214
233static inline struct irq_desc * 215static inline struct irq_desc *
234irq_remap_to_desc(unsigned int irq, struct irq_desc *desc) 216irq_remap_to_desc(unsigned int irq, struct irq_desc *desc)