diff options
-rw-r--r-- | fs/proc/stat.c | 11 | ||||
-rw-r--r-- | kernel/irq/handle.c | 2 |
2 files changed, 2 insertions, 11 deletions
diff --git a/fs/proc/stat.c b/fs/proc/stat.c index 3bb1cf1e7425..f75efa22df5e 100644 --- a/fs/proc/stat.c +++ b/fs/proc/stat.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/seq_file.h> | 9 | #include <linux/seq_file.h> |
10 | #include <linux/slab.h> | 10 | #include <linux/slab.h> |
11 | #include <linux/time.h> | 11 | #include <linux/time.h> |
12 | #include <linux/irqnr.h> | ||
12 | #include <asm/cputime.h> | 13 | #include <asm/cputime.h> |
13 | 14 | ||
14 | #ifndef arch_irq_stat_cpu | 15 | #ifndef arch_irq_stat_cpu |
@@ -45,10 +46,6 @@ static int show_stat(struct seq_file *p, void *v) | |||
45 | steal = cputime64_add(steal, kstat_cpu(i).cpustat.steal); | 46 | steal = cputime64_add(steal, kstat_cpu(i).cpustat.steal); |
46 | guest = cputime64_add(guest, kstat_cpu(i).cpustat.guest); | 47 | guest = cputime64_add(guest, kstat_cpu(i).cpustat.guest); |
47 | for_each_irq_nr(j) { | 48 | for_each_irq_nr(j) { |
48 | #ifdef CONFIG_SPARSE_IRQ | ||
49 | if (!irq_to_desc(j)) | ||
50 | continue; | ||
51 | #endif | ||
52 | sum += kstat_irqs_cpu(j, i); | 49 | sum += kstat_irqs_cpu(j, i); |
53 | } | 50 | } |
54 | sum += arch_irq_stat_cpu(i); | 51 | sum += arch_irq_stat_cpu(i); |
@@ -95,12 +92,6 @@ static int show_stat(struct seq_file *p, void *v) | |||
95 | /* sum again ? it could be updated? */ | 92 | /* sum again ? it could be updated? */ |
96 | for_each_irq_nr(j) { | 93 | for_each_irq_nr(j) { |
97 | per_irq_sum = 0; | 94 | per_irq_sum = 0; |
98 | #ifdef CONFIG_SPARSE_IRQ | ||
99 | if (!irq_to_desc(j)) { | ||
100 | seq_printf(p, " %u", per_irq_sum); | ||
101 | continue; | ||
102 | } | ||
103 | #endif | ||
104 | for_each_possible_cpu(i) | 95 | for_each_possible_cpu(i) |
105 | per_irq_sum += kstat_irqs_cpu(j, i); | 96 | per_irq_sum += kstat_irqs_cpu(j, i); |
106 | 97 | ||
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index 4db7d2df86b6..03479dfdebb8 100644 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c | |||
@@ -448,7 +448,7 @@ void early_init_irq_lock_class(void) | |||
448 | unsigned int kstat_irqs_cpu(unsigned int irq, int cpu) | 448 | unsigned int kstat_irqs_cpu(unsigned int irq, int cpu) |
449 | { | 449 | { |
450 | struct irq_desc *desc = irq_to_desc(irq); | 450 | struct irq_desc *desc = irq_to_desc(irq); |
451 | return desc->kstat_irqs[cpu]; | 451 | return desc ? desc->kstat_irqs[cpu] : 0; |
452 | } | 452 | } |
453 | #endif | 453 | #endif |
454 | EXPORT_SYMBOL(kstat_irqs_cpu); | 454 | EXPORT_SYMBOL(kstat_irqs_cpu); |