sparseirq: use kstat_irqs_cpu instead
authorYinghai Lu <yinghai@kernel.org>
Sun, 11 Jan 2009 08:29:15 +0000 (00:29 -0800)
committerIngo Molnar <mingo@elte.hu>
Sun, 11 Jan 2009 14:53:13 +0000 (15:53 +0100)
Impact: build fix

Ingo Molnar wrote:

> tip/arch/blackfin/kernel/irqchip.c: In function 'show_interrupts':
> tip/arch/blackfin/kernel/irqchip.c:85: error: 'struct kernel_stat' has no member named 'irqs'
> make[2]: *** [arch/blackfin/kernel/irqchip.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
>

So could move kstat_irqs array to irq_desc struct.

(s390, m68k, sparc) are not touched yet, because they don't support genirq

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 files changed:
arch/blackfin/kernel/irqchip.c
arch/frv/kernel/irq.c
arch/h8300/kernel/irq.c
arch/ia64/kernel/irq.c
arch/m32r/kernel/irq.c
arch/mips/kernel/irq.c
arch/mn10300/kernel/irq.c
arch/parisc/kernel/irq.c
arch/powerpc/kernel/irq.c
arch/powerpc/platforms/cell/interrupt.c
arch/sh/kernel/irq.c
arch/um/kernel/irq.c
arch/xtensa/kernel/irq.c

index ab8209c..a4e12d1 100644 (file)
@@ -82,7 +82,7 @@ int show_interrupts(struct seq_file *p, void *v)
                        goto skip;
                seq_printf(p, "%3d: ", i);
                for_each_online_cpu(j)
-                       seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
+                       seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
                seq_printf(p, " %8s", irq_desc[i].chip->name);
                seq_printf(p, "  %s", action->name);
                for (action = action->next; action; action = action->next)
index 73abae7..af3e824 100644 (file)
@@ -74,7 +74,7 @@ int show_interrupts(struct seq_file *p, void *v)
                if (action) {
                        seq_printf(p, "%3d: ", i);
                        for_each_present_cpu(cpu)
-                               seq_printf(p, "%10u ", kstat_cpu(cpu).irqs[i]);
+                               seq_printf(p, "%10u ", kstat_irqs_cpu(i, cpu));
                        seq_printf(p, " %10s", irq_desc[i].chip->name ? : "-");
                        seq_printf(p, "  %s", action->name);
                        for (action = action->next;
index ef4f004..74f8dd7 100644 (file)
@@ -183,7 +183,7 @@ asmlinkage void do_IRQ(int irq)
 #if defined(CONFIG_PROC_FS)
 int show_interrupts(struct seq_file *p, void *v)
 {
-       int i = *(loff_t *) v, j;
+       int i = *(loff_t *) v;
        struct irqaction * action;
        unsigned long flags;
 
@@ -196,7 +196,7 @@ int show_interrupts(struct seq_file *p, void *v)
                if (!action)
                        goto unlock;
                seq_printf(p, "%3d: ",i);
-               seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
+               seq_printf(p, "%10u ", kstat_irqs(i));
                seq_printf(p, " %14s", irq_desc[i].chip->name);
                seq_printf(p, "-%-8s", irq_desc[i].name);
                seq_printf(p, "  %s", action->name);
index a58f64c..4f59661 100644 (file)
@@ -80,7 +80,7 @@ int show_interrupts(struct seq_file *p, void *v)
                seq_printf(p, "%10u ", kstat_irqs(i));
 #else
                for_each_online_cpu(j) {
-                       seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
+                       seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
                }
 #endif
                seq_printf(p, " %14s", irq_desc[i].chip->name);
index 2aeae46..8dfd31e 100644 (file)
@@ -49,7 +49,7 @@ int show_interrupts(struct seq_file *p, void *v)
                seq_printf(p, "%10u ", kstat_irqs(i));
 #else
                for_each_online_cpu(j)
-                       seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
+                       seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
 #endif
                seq_printf(p, " %14s", irq_desc[i].chip->typename);
                seq_printf(p, "  %s", action->name);
index 4b4007b..98f336d 100644 (file)
@@ -108,7 +108,7 @@ int show_interrupts(struct seq_file *p, void *v)
                seq_printf(p, "%10u ", kstat_irqs(i));
 #else
                for_each_online_cpu(j)
-                       seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
+                       seq_printf(p, "%10u ", kstat_cpu(i, j));
 #endif
                seq_printf(p, " %14s", irq_desc[i].chip->name);
                seq_printf(p, "  %s", action->name);
index 56c64cc..50fdb5c 100644 (file)
@@ -221,7 +221,7 @@ int show_interrupts(struct seq_file *p, void *v)
                if (action) {
                        seq_printf(p, "%3d: ", i);
                        for_each_present_cpu(cpu)
-                               seq_printf(p, "%10u ", kstat_cpu(cpu).irqs[i]);
+                               seq_printf(p, "%10u ", kstat_irqs_cpu(i, cpu));
                        seq_printf(p, " %14s.%u", irq_desc[i].chip->name,
                                   (GxICR(i) & GxICR_LEVEL) >>
                                   GxICR_LEVEL_SHIFT);
index ac2c822..704341b 100644 (file)
@@ -183,7 +183,7 @@ int show_interrupts(struct seq_file *p, void *v)
                seq_printf(p, "%3d: ", i);
 #ifdef CONFIG_SMP
                for_each_online_cpu(j)
-                       seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
+                       seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
 #else
                seq_printf(p, "%10u ", kstat_irqs(i));
 #endif
index 23b8b5e..17efb71 100644 (file)
@@ -190,7 +190,7 @@ int show_interrupts(struct seq_file *p, void *v)
                seq_printf(p, "%3d: ", i);
 #ifdef CONFIG_SMP
                for_each_online_cpu(j)
-                       seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
+                       seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
 #else
                seq_printf(p, "%10u ", kstat_irqs(i));
 #endif /* CONFIG_SMP */
index 28c04da..1f0d774 100644 (file)
@@ -254,7 +254,7 @@ static void handle_iic_irq(unsigned int irq, struct irq_desc *desc)
                goto out_eoi;
        }
 
-       kstat_cpu(cpu).irqs[irq]++;
+       kstat_incr_irqs_this_cpu(irq, desc);
 
        /* Mark the IRQ currently in progress.*/
        desc->status |= IRQ_INPROGRESS;
index 64b7690..0080a16 100644 (file)
@@ -51,7 +51,7 @@ int show_interrupts(struct seq_file *p, void *v)
                        goto unlock;
                seq_printf(p, "%3d: ",i);
                for_each_online_cpu(j)
-                       seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
+                       seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
                seq_printf(p, " %14s", irq_desc[i].chip->name);
                seq_printf(p, "-%-8s", irq_desc[i].name);
                seq_printf(p, "  %s", action->name);
index 3d7aad0..336b615 100644 (file)
@@ -42,7 +42,7 @@ int show_interrupts(struct seq_file *p, void *v)
                seq_printf(p, "%10u ", kstat_irqs(i));
 #else
                for_each_online_cpu(j)
-                       seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
+                       seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
 #endif
                seq_printf(p, " %14s", irq_desc[i].chip->typename);
                seq_printf(p, "  %s", action->name);
index 5fbcde5..f3b66fb 100644 (file)
@@ -99,7 +99,7 @@ int show_interrupts(struct seq_file *p, void *v)
                seq_printf(p, "%10u ", kstat_irqs(i));
 #else
                for_each_online_cpu(j)
-                       seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
+                       seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
 #endif
                seq_printf(p, " %14s", irq_desc[i].chip->typename);
                seq_printf(p, "  %s", action->name);