[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201218143122.19459-20-info@metux.net>
Date: Fri, 18 Dec 2020 15:31:18 +0100
From: "Enrico Weigelt, metux IT consult" <info@...ux.net>
To: linux-kernel@...r.kernel.org
Cc: mark.rutland@....com, alexander.shishkin@...ux.intel.com,
jolsa@...hat.com, namhyung@...nel.org, catalin.marinas@....com,
will@...nel.org, msalter@...hat.com, jacquiot.aurelien@...il.com,
gerg@...ux-m68k.org, geert@...ux-m68k.org,
tsbogend@...ha.franken.de, James.Bottomley@...senPartnership.com,
deller@....de, benh@...nel.crashing.org, paulus@...ba.org,
ysato@...rs.sourceforge.jp, dalias@...c.org, davem@...emloft.net,
tglx@...utronix.de, bp@...en8.de, x86@...nel.org, hpa@...or.com,
linus.walleij@...aro.org, bgolaszewski@...libre.com,
maz@...nel.org, tony@...mide.com, arnd@...db.de,
linux-alpha@...r.kernel.org, linux-c6x-dev@...ux-c6x.org,
linux-ia64@...r.kernel.org, linux-m68k@...ts.linux-m68k.org,
linux-mips@...r.kernel.org, linux-parisc@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, linux-s390@...r.kernel.org,
linux-sh@...r.kernel.org, sparclinux@...r.kernel.org,
linux-gpio@...r.kernel.org, linux-omap@...r.kernel.org,
linux-arch@...r.kernel.org
Subject: [PATCH 19/23] arch: c6x: use generic irq error counter
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@...ux.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(-)
diff --git a/arch/c6x/include/asm/hardirq.h b/arch/c6x/include/asm/hardirq.h
index f37d07d31040..f70f6113e53a 100644
--- a/arch/c6x/include/asm/hardirq.h
+++ b/arch/c6x/include/asm/hardirq.h
@@ -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 */
diff --git a/arch/c6x/include/asm/irq.h b/arch/c6x/include/asm/irq.h
index 9da4d1afd0d7..f42c5747c3ee 100644
--- a/arch/c6x/include/asm/irq.h
+++ b/arch/c6x/include/asm/irq.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 */
diff --git a/arch/c6x/kernel/irq.c b/arch/c6x/kernel/irq.c
index b9f7cfa2ed21..9f9d798925de 100644
--- a/arch/c6x/kernel/irq.c
+++ b/arch/c6x/kernel/irq.c
@@ -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;
}
--
2.11.0
Powered by blists - more mailing lists