aboutsummaryrefslogtreecommitdiff
path: root/include/linux/kernel_stat.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/kernel_stat.h')
-rw-r--r--include/linux/kernel_stat.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h
index dba27749b42..a484572c302 100644
--- a/include/linux/kernel_stat.h
+++ b/include/linux/kernel_stat.h
@@ -6,6 +6,7 @@
#include <linux/smp.h>
#include <linux/threads.h>
#include <linux/percpu.h>
+#include <linux/cpumask.h>
#include <asm/cputime.h>
/*
@@ -43,11 +44,10 @@ extern unsigned long long nr_context_switches(void);
*/
static inline int kstat_irqs(int irq)
{
- int i, sum=0;
+ int cpu, sum = 0;
- for (i = 0; i < NR_CPUS; i++)
- if (cpu_possible(i))
- sum += kstat_cpu(i).irqs[irq];
+ for_each_cpu(cpu)
+ sum += kstat_cpu(cpu).irqs[irq];
return sum;
}