diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-08-25 15:41:19 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-16 10:53:04 -0400 |
commit | 8c464a4b23ca283b414022ebc77787f3c7040fa7 (patch) | |
tree | 1d62a78b0af21492289d015c81270683f6bbe0bd /include | |
parent | e492c5ae85428d4a3815d06bf308c590120b928b (diff) |
sparseirq: move kstat_irqs from kstat to irq_desc - fix
fix non-sparseirq architectures.
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/irq.h | 4 | ||||
-rw-r--r-- | include/linux/kernel_stat.h | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index 2445d2b3d5dc..93fe9a943e71 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -161,8 +161,6 @@ struct irq_desc { | |||
161 | #endif | 161 | #endif |
162 | #ifdef CONFIG_HAVE_DYN_ARRAY | 162 | #ifdef CONFIG_HAVE_DYN_ARRAY |
163 | unsigned int *kstat_irqs; | 163 | unsigned int *kstat_irqs; |
164 | #else | ||
165 | unsigned int kstat_irqs[NR_CPUS]; | ||
166 | #endif | 164 | #endif |
167 | #if defined(CONFIG_INTR_REMAP) && defined(CONFIG_HAVE_SPARSE_IRQ) | 165 | #if defined(CONFIG_INTR_REMAP) && defined(CONFIG_HAVE_SPARSE_IRQ) |
168 | struct irq_2_iommu *irq_2_iommu; | 166 | struct irq_2_iommu *irq_2_iommu; |
@@ -219,8 +217,10 @@ extern struct irq_desc *sparse_irqs; | |||
219 | 217 | ||
220 | #endif | 218 | #endif |
221 | 219 | ||
220 | #ifdef CONFIG_HAVE_DYN_ARRAY | ||
222 | #define kstat_irqs_this_cpu(DESC) \ | 221 | #define kstat_irqs_this_cpu(DESC) \ |
223 | ((DESC)->kstat_irqs[smp_processor_id()]) | 222 | ((DESC)->kstat_irqs[smp_processor_id()]) |
223 | #endif | ||
224 | 224 | ||
225 | /* | 225 | /* |
226 | * Migration helpers for obsolete names, they will go away: | 226 | * Migration helpers for obsolete names, they will go away: |
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index f10616712de5..21249d8c1293 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h | |||
@@ -28,7 +28,7 @@ struct cpu_usage_stat { | |||
28 | 28 | ||
29 | struct kernel_stat { | 29 | struct kernel_stat { |
30 | struct cpu_usage_stat cpustat; | 30 | struct cpu_usage_stat cpustat; |
31 | #ifndef CONFIG_GENERIC_HARDIRQS | 31 | #ifndef CONFIG_HAVE_DYN_ARRAY |
32 | unsigned int irqs[NR_IRQS]; | 32 | unsigned int irqs[NR_IRQS]; |
33 | #endif | 33 | #endif |
34 | }; | 34 | }; |
@@ -41,7 +41,13 @@ DECLARE_PER_CPU(struct kernel_stat, kstat); | |||
41 | 41 | ||
42 | extern unsigned long long nr_context_switches(void); | 42 | extern unsigned long long nr_context_switches(void); |
43 | 43 | ||
44 | #ifndef CONFIG_GENERIC_HARDIRQS | 44 | #ifndef CONFIG_HAVE_DYN_ARRAY |
45 | #define kstat_irqs_this_cpu(irq) \ | ||
46 | (kstat_this_cpu.irqs[irq]) | ||
47 | #endif | ||
48 | |||
49 | |||
50 | #ifndef CONFIG_HAVE_DYN_ARRAY | ||
45 | static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu) | 51 | static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu) |
46 | { | 52 | { |
47 | return kstat_cpu(cpu).irqs[irq]; | 53 | return kstat_cpu(cpu).irqs[irq]; |