@@ -9,9 +9,6 @@
#ifndef _ASM_C6X_HARDIRQ_H
#define _ASM_C6X_HARDIRQ_H
-extern void ack_bad_irq(int irq);
-#define ack_bad_irq ack_bad_irq
-
#include <asm-generic/hardirq.h>
#endif /* _ASM_C6X_HARDIRQ_H */
@@ -45,6 +45,4 @@ struct pt_regs;
extern asmlinkage void c6x_do_IRQ(unsigned int prio, struct pt_regs *regs);
-extern unsigned long irq_err_count;
-
#endif /* _ASM_C6X_IRQ_H */
@@ -21,12 +21,10 @@
#include <linux/of_irq.h>
#include <linux/interrupt.h>
#include <linux/kernel_stat.h>
-
+#include <asm-generic/irq-err.h>
#include <asm/megamod-pic.h>
#include <asm/special_insns.h>
-unsigned long irq_err_count;
-
static DEFINE_RAW_SPINLOCK(core_irq_lock);
static void mask_core_irq(struct irq_data *data)
@@ -114,13 +112,8 @@ void __init init_IRQ(void)
set_creg(ICR, 0xfff0);
}
-void ack_bad_irq(int irq)
-{
- irq_err_count++;
-}
-
int arch_show_interrupts(struct seq_file *p, int prec)
{
- seq_printf(p, "%*s: %10lu\n", prec, "Err", irq_err_count);
+ seq_printf(p, "%*s: %10lu\n", prec, "Err", irq_err_get());
return 0;
}
Use the newly introduced irq error counter, that's already maintained by all callers of ack_bad_irq(), in order to remove duplicate code. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> --- arch/c6x/include/asm/hardirq.h | 3 --- arch/c6x/include/asm/irq.h | 2 -- arch/c6x/kernel/irq.c | 11 ++--------- 3 files changed, 2 insertions(+), 14 deletions(-)