Skip to content

Commit

Permalink
blackfin:Use generic /proc/interrupts implementation
Browse files Browse the repository at this point in the history
There is nothing special in that blackfin code. Use the core
implementation.

Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Steven Miao <[email protected]>
Cc: bfin <[email protected]>
  • Loading branch information
KAGA-KOKO authored and realmz committed Apr 11, 2014
1 parent 30fc7eb commit e8fac63
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 30 deletions.
1 change: 1 addition & 0 deletions arch/blackfin/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ config BLACKFIN
select ARCH_WANT_IPC_PARSE_VERSION
select GENERIC_ATOMIC64
select GENERIC_IRQ_PROBE
select GENERIC_IRQ_SHOW
select HAVE_NMI_WATCHDOG if NMI_WATCHDOG
select GENERIC_SMP_IDLE_THREAD
select ARCH_USES_GETTIMEOFFSET if !GENERIC_CLOCKEVENTS
Expand Down
39 changes: 9 additions & 30 deletions arch/blackfin/kernel/irqchip.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/kallsyms.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/seq_file.h>
#include <asm/irq_handler.h>
#include <asm/trace.h>
#include <asm/pda.h>
Expand All @@ -33,37 +34,15 @@ static struct irq_desc bad_irq_desc = {
#endif

#ifdef CONFIG_PROC_FS
int show_interrupts(struct seq_file *p, void *v)
int arch_show_interrupts(struct seq_file *p, int prec)
{
int i = *(loff_t *) v, j;
struct irqaction *action;
unsigned long flags;

if (i < NR_IRQS) {
struct irq_desc *desc = irq_to_desc(i);

raw_spin_lock_irqsave(&desc->lock, flags);
action = desc->action;
if (!action)
goto skip;
seq_printf(p, "%3d: ", i);
for_each_online_cpu(j)
seq_printf(p, "%10u ", kstat_irqs_cpu(i, j));
seq_printf(p, " %8s", irq_desc_get_chip(desc)->name);
seq_printf(p, " %s", action->name);
for (action = action->next; action; action = action->next)
seq_printf(p, " %s", action->name);

seq_putc(p, '\n');
skip:
raw_spin_unlock_irqrestore(&desc->lock, flags);
} else if (i == NR_IRQS) {
seq_printf(p, "NMI: ");
for_each_online_cpu(j)
seq_printf(p, "%10u ", cpu_pda[j].__nmi_count);
seq_printf(p, " CORE Non Maskable Interrupt\n");
seq_printf(p, "Err: %10u\n", atomic_read(&irq_err_count));
}
int j;

seq_printf(p, "%*s: ", prec, "NMI");
for_each_online_cpu(j)
seq_printf(p, "%10u ", cpu_pda[j].__nmi_count);
seq_printf(p, " CORE Non Maskable Interrupt\n");
seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count));
return 0;
}
#endif
Expand Down

0 comments on commit e8fac63

Please sign in to comment.