]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
sh: Convert to generic show_interrupts.
authorPaul Mundt <lethal@linux-sh.org>
Thu, 17 Mar 2011 08:31:51 +0000 (17:31 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Thu, 17 Mar 2011 08:31:51 +0000 (17:31 +0900)
Trivial conversion, simply encapsulate the NMI stats in the arch code.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/Kconfig
arch/sh/kernel/irq.c

index ca649d32a843e0c26bee11c33f40e8275ac65a0c..2d264fa84959dde3488b79c8d0fd111b5df63a7e 100644 (file)
@@ -25,6 +25,7 @@ config SUPERH
        select GENERIC_ATOMIC64
        # Support the deprecated APIs until MFD and GPIOLIB catch up.
        select GENERIC_HARDIRQS_NO_DEPRECATED if !MFD_SUPPORT && !GPIOLIB
+       select GENERIC_IRQ_SHOW
        help
          The SuperH is a RISC processor targeted for use in embedded systems
          and consumer electronics; it was also used in the Sega Dreamcast
index 68ecbe6c881a5fe33cf17a3f5f18cc96fd996440..64ea0b165399260665c68a63e5d3debba3b95356 100644 (file)
@@ -34,9 +34,9 @@ void ack_bad_irq(unsigned int irq)
 
 #if defined(CONFIG_PROC_FS)
 /*
- * /proc/interrupts printing:
+ * /proc/interrupts printing for arch specific interrupts
  */
-static int show_other_interrupts(struct seq_file *p, int prec)
+int arch_show_interrupts(struct seq_file *p, int prec)
 {
        int j;
 
@@ -49,63 +49,6 @@ static int show_other_interrupts(struct seq_file *p, int prec)
 
        return 0;
 }
-
-int show_interrupts(struct seq_file *p, void *v)
-{
-       unsigned long flags, any_count = 0;
-       int i = *(loff_t *)v, j, prec;
-       struct irqaction *action;
-       struct irq_desc *desc;
-       struct irq_data *data;
-       struct irq_chip *chip;
-
-       if (i > nr_irqs)
-               return 0;
-
-       for (prec = 3, j = 1000; prec < 10 && j <= nr_irqs; ++prec)
-               j *= 10;
-
-       if (i == nr_irqs)
-               return show_other_interrupts(p, prec);
-
-       if (i == 0) {
-               seq_printf(p, "%*s", prec + 8, "");
-               for_each_online_cpu(j)
-                       seq_printf(p, "CPU%-8d", j);
-               seq_putc(p, '\n');
-       }
-
-       desc = irq_to_desc(i);
-       if (!desc)
-               return 0;
-
-       data = irq_get_irq_data(i);
-       chip = irq_data_get_irq_chip(data);
-
-       raw_spin_lock_irqsave(&desc->lock, flags);
-       for_each_online_cpu(j)
-               any_count |= kstat_irqs_cpu(i, j);
-       action = desc->action;
-       if (!action && !any_count)
-               goto out;
-
-       seq_printf(p, "%*d: ", prec, i);
-       for_each_online_cpu(j)
-               seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
-       seq_printf(p, " %14s", chip->name);
-       seq_printf(p, "-%-8s", desc->name);
-
-       if (action) {
-               seq_printf(p, "  %s", action->name);
-               while ((action = action->next) != NULL)
-                       seq_printf(p, ", %s", action->name);
-       }
-
-       seq_putc(p, '\n');
-out:
-       raw_spin_unlock_irqrestore(&desc->lock, flags);
-       return 0;
-}
 #endif
 
 #ifdef CONFIG_IRQSTACKS