diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-31 12:00:59 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-31 12:00:59 -0500 |
| commit | db200df0b3530f673d8e9f5bd535e9e10305842a (patch) | |
| tree | 9a94039b8813452c51a50fcb45e95c32a9f0e537 /include/linux/irq.h | |
| parent | ec270e59a74eee972006a87c8e12514a20588369 (diff) | |
| parent | 43a256322ac1fc105c181b3cade3b9bfc0b63ca1 (diff) | |
Merge branch 'irq-fixes-for-linus-4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'irq-fixes-for-linus-4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
sparseirq: move __weak symbols into separate compilation unit
sparseirq: work around __weak alias bug
sparseirq: fix hang with !SPARSE_IRQ
sparseirq: set lock_class for legacy irq when sparse_irq is selected
sparseirq: work around compiler optimizing away __weak functions
sparseirq: fix desc->lock init
sparseirq: do not printk when migrating IRQ descriptors
sparseirq: remove duplicated arch_early_irq_init()
irq: simplify for_each_irq_desc() usage
proc: remove ifdef CONFIG_SPARSE_IRQ from stat.c
irq: for_each_irq_desc() move to irqnr.h
hrtimer: remove #include <linux/irq.h>
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) |
