diff options
Diffstat (limited to 'include/linux/kernel_stat.h')
-rw-r--r-- | include/linux/kernel_stat.h | 10 |
1 files changed, 8 insertions, 2 deletions
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]; |