diff options
-rw-r--r-- | fs/proc/proc_misc.c | 7 | ||||
-rw-r--r-- | include/linux/irq.h | 3 |
2 files changed, 5 insertions, 5 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index 3f5c7b9d1a70..97b4579134d5 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c | |||
@@ -509,9 +509,6 @@ static int show_stat(struct seq_file *p, void *v) | |||
509 | u64 sum = 0; | 509 | u64 sum = 0; |
510 | struct timespec boottime; | 510 | struct timespec boottime; |
511 | unsigned int per_irq_sum; | 511 | unsigned int per_irq_sum; |
512 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
513 | struct irq_desc *desc; | ||
514 | #endif | ||
515 | 512 | ||
516 | user = nice = system = idle = iowait = | 513 | user = nice = system = idle = iowait = |
517 | irq = softirq = steal = cputime64_zero; | 514 | irq = softirq = steal = cputime64_zero; |
@@ -530,7 +527,7 @@ static int show_stat(struct seq_file *p, void *v) | |||
530 | steal = cputime64_add(steal, kstat_cpu(i).cpustat.steal); | 527 | steal = cputime64_add(steal, kstat_cpu(i).cpustat.steal); |
531 | guest = cputime64_add(guest, kstat_cpu(i).cpustat.guest); | 528 | guest = cputime64_add(guest, kstat_cpu(i).cpustat.guest); |
532 | 529 | ||
533 | for_each_irq_desc(j, desc) | 530 | for_each_irq_nr(j) |
534 | sum += kstat_irqs_cpu(j, i); | 531 | sum += kstat_irqs_cpu(j, i); |
535 | 532 | ||
536 | sum += arch_irq_stat_cpu(i); | 533 | sum += arch_irq_stat_cpu(i); |
@@ -575,7 +572,7 @@ static int show_stat(struct seq_file *p, void *v) | |||
575 | seq_printf(p, "intr %llu", (unsigned long long)sum); | 572 | seq_printf(p, "intr %llu", (unsigned long long)sum); |
576 | 573 | ||
577 | /* sum again ? it could be updated? */ | 574 | /* sum again ? it could be updated? */ |
578 | for_each_irq_desc(j, desc) { | 575 | for_each_irq_nr(j) { |
579 | per_irq_sum = 0; | 576 | per_irq_sum = 0; |
580 | 577 | ||
581 | for_each_possible_cpu(i) | 578 | for_each_possible_cpu(i) |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 31632aa65d16..0618fb362cb4 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -27,6 +27,9 @@ extern int nr_irqs; | |||
27 | irq > 0; irq--, desc--) | 27 | irq > 0; irq--, desc--) |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | #define for_each_irq_nr(irq) \ | ||
31 | for (irq = 0; irq < nr_irqs; irq++) | ||
32 | |||
30 | #ifndef CONFIG_S390 | 33 | #ifndef CONFIG_S390 |
31 | 34 | ||
32 | #include <linux/linkage.h> | 35 | #include <linux/linkage.h> |