diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-13 06:25:51 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-13 06:25:51 -0500 |
commit | 968ea6d80e395cf11a51143cfa1b9a14ada676df (patch) | |
tree | dc2acec8c9bdced33afe1e273ee5e0b0b93d2703 /include/linux/irq.h | |
parent | 7be7585393d311866653564fbcd10a3232773c0b (diff) | |
parent | 8299608f140ae321e4eb5d1306184265d2b9511e (diff) |
Merge ../linux-2.6-x86
Conflicts:
arch/x86/kernel/io_apic.c
kernel/sched.c
kernel/sched_stats.h
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r-- | include/linux/irq.h | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index ab70fd604d3a..59525b74979f 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -130,6 +130,8 @@ struct irq_chip { | |||
130 | const char *typename; | 130 | const char *typename; |
131 | }; | 131 | }; |
132 | 132 | ||
133 | struct timer_rand_state; | ||
134 | struct irq_2_iommu; | ||
133 | /** | 135 | /** |
134 | * struct irq_desc - interrupt descriptor | 136 | * struct irq_desc - interrupt descriptor |
135 | * @irq: interrupt number for this descriptor | 137 | * @irq: interrupt number for this descriptor |
@@ -155,6 +157,13 @@ struct irq_chip { | |||
155 | */ | 157 | */ |
156 | struct irq_desc { | 158 | struct irq_desc { |
157 | unsigned int irq; | 159 | unsigned int irq; |
160 | #ifdef CONFIG_SPARSE_IRQ | ||
161 | struct timer_rand_state *timer_rand_state; | ||
162 | unsigned int *kstat_irqs; | ||
163 | # ifdef CONFIG_INTR_REMAP | ||
164 | struct irq_2_iommu *irq_2_iommu; | ||
165 | # endif | ||
166 | #endif | ||
158 | irq_flow_handler_t handle_irq; | 167 | irq_flow_handler_t handle_irq; |
159 | struct irq_chip *chip; | 168 | struct irq_chip *chip; |
160 | struct msi_desc *msi_desc; | 169 | struct msi_desc *msi_desc; |
@@ -182,14 +191,43 @@ struct irq_desc { | |||
182 | const char *name; | 191 | const char *name; |
183 | } ____cacheline_internodealigned_in_smp; | 192 | } ____cacheline_internodealigned_in_smp; |
184 | 193 | ||
194 | extern void early_irq_init(void); | ||
195 | extern void arch_early_irq_init(void); | ||
196 | extern void arch_init_chip_data(struct irq_desc *desc, int cpu); | ||
197 | extern void arch_init_copy_chip_data(struct irq_desc *old_desc, | ||
198 | struct irq_desc *desc, int cpu); | ||
199 | extern void arch_free_chip_data(struct irq_desc *old_desc, struct irq_desc *desc); | ||
185 | 200 | ||
201 | #ifndef CONFIG_SPARSE_IRQ | ||
186 | extern struct irq_desc irq_desc[NR_IRQS]; | 202 | extern struct irq_desc irq_desc[NR_IRQS]; |
187 | 203 | ||
188 | static inline struct irq_desc *irq_to_desc(unsigned int irq) | 204 | static inline struct irq_desc *irq_to_desc(unsigned int irq) |
189 | { | 205 | { |
190 | return (irq < nr_irqs) ? irq_desc + irq : NULL; | 206 | return (irq < NR_IRQS) ? irq_desc + irq : NULL; |
207 | } | ||
208 | static inline struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu) | ||
209 | { | ||
210 | return irq_to_desc(irq); | ||
191 | } | 211 | } |
192 | 212 | ||
213 | #else | ||
214 | |||
215 | extern struct irq_desc *irq_to_desc(unsigned int irq); | ||
216 | extern struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu); | ||
217 | extern struct irq_desc *move_irq_desc(struct irq_desc *old_desc, int cpu); | ||
218 | |||
219 | # define for_each_irq_desc(irq, desc) \ | ||
220 | for (irq = 0, desc = irq_to_desc(irq); irq < nr_irqs; irq++, desc = irq_to_desc(irq)) | ||
221 | # define for_each_irq_desc_reverse(irq, desc) \ | ||
222 | for (irq = nr_irqs - 1, desc = irq_to_desc(irq); irq >= 0; irq--, desc = irq_to_desc(irq)) | ||
223 | |||
224 | #define kstat_irqs_this_cpu(DESC) \ | ||
225 | ((DESC)->kstat_irqs[smp_processor_id()]) | ||
226 | #define kstat_incr_irqs_this_cpu(irqno, DESC) \ | ||
227 | ((DESC)->kstat_irqs[smp_processor_id()]++) | ||
228 | |||
229 | #endif | ||
230 | |||
193 | /* | 231 | /* |
194 | * Migration helpers for obsolete names, they will go away: | 232 | * Migration helpers for obsolete names, they will go away: |
195 | */ | 233 | */ |
@@ -381,6 +419,11 @@ extern int set_irq_msi(unsigned int irq, struct msi_desc *entry); | |||
381 | #define get_irq_data(irq) (irq_to_desc(irq)->handler_data) | 419 | #define get_irq_data(irq) (irq_to_desc(irq)->handler_data) |
382 | #define get_irq_msi(irq) (irq_to_desc(irq)->msi_desc) | 420 | #define get_irq_msi(irq) (irq_to_desc(irq)->msi_desc) |
383 | 421 | ||
422 | #define get_irq_desc_chip(desc) ((desc)->chip) | ||
423 | #define get_irq_desc_chip_data(desc) ((desc)->chip_data) | ||
424 | #define get_irq_desc_data(desc) ((desc)->handler_data) | ||
425 | #define get_irq_desc_msi(desc) ((desc)->msi_desc) | ||
426 | |||
384 | #endif /* CONFIG_GENERIC_HARDIRQS */ | 427 | #endif /* CONFIG_GENERIC_HARDIRQS */ |
385 | 428 | ||
386 | #endif /* !CONFIG_S390 */ | 429 | #endif /* !CONFIG_S390 */ |