diff options
Diffstat (limited to 'include/linux/kernel_stat.h')
-rw-r--r-- | include/linux/kernel_stat.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index dba27749b428..a484572c302e 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/smp.h> | 6 | #include <linux/smp.h> |
7 | #include <linux/threads.h> | 7 | #include <linux/threads.h> |
8 | #include <linux/percpu.h> | 8 | #include <linux/percpu.h> |
9 | #include <linux/cpumask.h> | ||
9 | #include <asm/cputime.h> | 10 | #include <asm/cputime.h> |
10 | 11 | ||
11 | /* | 12 | /* |
@@ -43,11 +44,10 @@ extern unsigned long long nr_context_switches(void); | |||
43 | */ | 44 | */ |
44 | static inline int kstat_irqs(int irq) | 45 | static inline int kstat_irqs(int irq) |
45 | { | 46 | { |
46 | int i, sum=0; | 47 | int cpu, sum = 0; |
47 | 48 | ||
48 | for (i = 0; i < NR_CPUS; i++) | 49 | for_each_cpu(cpu) |
49 | if (cpu_possible(i)) | 50 | sum += kstat_cpu(cpu).irqs[irq]; |
50 | sum += kstat_cpu(i).irqs[irq]; | ||
51 | 51 | ||
52 | return sum; | 52 | return sum; |
53 | } | 53 | } |