linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] RISCV:IRQ: Adds Err column to /proc/interrupts
@ 2019-01-05 13:51 G SatishKumar
  2019-01-07  6:34 ` Paul Walmsley
  0 siblings, 1 reply; 5+ messages in thread
From: G SatishKumar @ 2019-01-05 13:51 UTC (permalink / raw)
  To: linux-riscv; +Cc: G SatishKumar

	This patch adds extra row showing error count to output of
	/proc/interrupts using seq_printf().

	seq_printf() API is used when printing to /proc/ files as a
	helper functions to return formatted output from ‘proc_read’
	callback.

	It adds Err: row to /proc/interrupts

	root@(none):~# cat /proc/interrupts
	           CPU0
	 8:        356  SiFive PLIC   8  virtio0
	10:       1717  SiFive PLIC  10  ttyS0
	IPI0:         0  Rescheduling interrupts
	IPI1:         0  Function call interrupts
	Err:          0

Signed-off-by: G SatishKumar <gsatish.ldd@gmail.com>
---
 arch/riscv/kernel/irq.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/riscv/kernel/irq.c b/arch/riscv/kernel/irq.c
index 1d76b60..509c96b 100644
--- a/arch/riscv/kernel/irq.c
+++ b/arch/riscv/kernel/irq.c
@@ -24,9 +24,12 @@
  */
 #define INTERRUPT_CAUSE_FLAG	(1UL << (__riscv_xlen - 1))
 
+unsigned long irq_err_count;
+
 int arch_show_interrupts(struct seq_file *p, int prec)
 {
 	show_ipi_stats(p, prec);
+	seq_printf(p, "%*s: %10lu\n", prec, "Err", irq_err_count);
 	return 0;
 }
 
-- 
2.7.4


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-01-08  4:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-05 13:51 [PATCH] RISCV:IRQ: Adds Err column to /proc/interrupts G SatishKumar
2019-01-07  6:34 ` Paul Walmsley
     [not found]   ` <CAK1XJzUHgkSe9GODaUHH89b4XD0zW0EvO5RMzt5f7hpWiVsfNg@mail.gmail.com>
2019-01-07 18:39     ` Paul Walmsley
2019-01-08  3:45       ` satish kumar
2019-01-08  4:17         ` Paul Walmsley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).