sparseirq: use kstat_irqs_cpu on non-x86 architectures too
authorYinghai Lu <yinghai@kernel.org>
Sun, 11 Jan 2009 21:35:56 +0000 (13:35 -0800)
committerIngo Molnar <mingo@elte.hu>
Mon, 12 Jan 2009 19:01:12 +0000 (20:01 +0100)
so we could move kstat_irqs array to irq_desc struct.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/alpha/kernel/irq.c
arch/alpha/kernel/irq_alpha.c
arch/arm/kernel/irq.c
arch/arm/mach-ns9xxx/irq.c
arch/avr32/kernel/irq.c
arch/cris/kernel/irq.c
arch/mips/kernel/irq.c

index 703731a..430550b 100644 (file)
@@ -90,7 +90,7 @@ show_interrupts(struct seq_file *p, void *v)
                seq_printf(p, "%10u ", kstat_irqs(irq));
 #else
                for_each_online_cpu(j)
-                       seq_printf(p, "%10u ", kstat_cpu(j).irqs[irq]);
+                       seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
 #endif
                seq_printf(p, " %14s", irq_desc[irq].chip->typename);
                seq_printf(p, "  %c%s",
index e16aeb6..67c19f8 100644 (file)
@@ -64,7 +64,7 @@ do_entInt(unsigned long type, unsigned long vector,
                smp_percpu_timer_interrupt(regs);
                cpu = smp_processor_id();
                if (cpu != boot_cpuid) {
-                       kstat_cpu(cpu).irqs[RTC_IRQ]++;
+                       kstat_incr_irqs_this_cpu(RTC_IRQ, irq_to_desc(RTC_IRQ));
                } else {
                        handle_irq(RTC_IRQ);
                }
index 7141cee..a285e4a 100644 (file)
@@ -76,7 +76,7 @@ int show_interrupts(struct seq_file *p, void *v)
 
                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; action; action = action->next)
index 22e0eb6..feb0e54 100644 (file)
@@ -63,7 +63,6 @@ static struct irq_chip ns9xxx_chip = {
 #else
 static void handle_prio_irq(unsigned int irq, struct irq_desc *desc)
 {
-       unsigned int cpu = smp_processor_id();
        struct irqaction *action;
        irqreturn_t action_ret;
 
@@ -72,7 +71,7 @@ static void handle_prio_irq(unsigned int irq, struct irq_desc *desc)
        BUG_ON(desc->status & IRQ_INPROGRESS);
 
        desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
-       kstat_cpu(cpu).irqs[irq]++;
+       kstat_incr_irqs_this_cpu(irq, desc);
 
        action = desc->action;
        if (unlikely(!action || (desc->status & IRQ_DISABLED)))
index a8e767d..9f57222 100644 (file)
@@ -58,7 +58,7 @@ int show_interrupts(struct seq_file *p, void *v)
 
                seq_printf(p, "%3d: ", i);
                for_each_online_cpu(cpu)
-                       seq_printf(p, "%10u ", kstat_cpu(cpu).irqs[i]);
+                       seq_printf(p, "%10u ", kstat_irqs_cpu(i, cpu));
                seq_printf(p, " %8s", irq_desc[i].chip->name ? : "-");
                seq_printf(p, "  %s", action->name);
                for (action = action->next; action; action = action->next)
index 2dfac8c..7f642fc 100644 (file)
@@ -66,7 +66,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 98f336d..7b845ba 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(i, j));
+                       seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
 #endif
                seq_printf(p, " %14s", irq_desc[i].chip->name);
                seq_printf(p, "  %s", action->name);