* [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
* Re: [PATCH] RISCV:IRQ: Adds Err column to /proc/interrupts
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>
0 siblings, 1 reply; 5+ messages in thread
From: Paul Walmsley @ 2019-01-07 6:34 UTC (permalink / raw)
To: G SatishKumar; +Cc: linux-riscv
[-- Attachment #1: Type: text/plain, Size: 1590 bytes --]
Hello,
On Sat, 5 Jan 2019, G SatishKumar wrote:
> This patch adds extra row showing error count to output of
> /proc/interrupts using seq_printf().
Please don't indent your patch descriptions.
> 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
Why? It's always going to print "0" with this patch. Does the missing
line break something?
>
> 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
>
[-- Attachment #2: Type: text/plain, Size: 161 bytes --]
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] RISCV:IRQ: Adds Err column to /proc/interrupts
[not found] ` <CAK1XJzUHgkSe9GODaUHH89b4XD0zW0EvO5RMzt5f7hpWiVsfNg@mail.gmail.com>
@ 2019-01-07 18:39 ` Paul Walmsley
2019-01-08 3:45 ` satish kumar
0 siblings, 1 reply; 5+ messages in thread
From: Paul Walmsley @ 2019-01-07 18:39 UTC (permalink / raw)
To: satish kumar; +Cc: linux-riscv, Paul Walmsley
[-- Attachment #1: Type: text/plain, Size: 2532 bytes --]
On Mon, 7 Jan 2019, satish kumar wrote:
> On Mon, 7 Jan 2019 at 12:04, Paul Walmsley <paul.walmsley@sifive.com> wrote:
> On Sat, 5 Jan 2019, G SatishKumar wrote:
>
> > 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
>
> Why? It's always going to print "0" with this patch. Does the missing
> line break something?
>
> It adds extra info in the /proc/interrupts which provides error count.
> It is used for printing information.
If this patch kept track of interrupt-related errors, I'd agree. But if
it always prints 0, as it currently does, then there doesn't seem much
point?
>
> >
> > 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
> >
>
>
>
[-- Attachment #2: Type: text/plain, Size: 161 bytes --]
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] RISCV:IRQ: Adds Err column to /proc/interrupts
2019-01-07 18:39 ` Paul Walmsley
@ 2019-01-08 3:45 ` satish kumar
2019-01-08 4:17 ` Paul Walmsley
0 siblings, 1 reply; 5+ messages in thread
From: satish kumar @ 2019-01-08 3:45 UTC (permalink / raw)
To: Paul Walmsley; +Cc: linux-riscv
On Tue, 8 Jan 2019 at 00:09, Paul Walmsley <paul.walmsley@sifive.com> wrote:
>
> On Mon, 7 Jan 2019, satish kumar wrote:
>
> > On Mon, 7 Jan 2019 at 12:04, Paul Walmsley <paul.walmsley@sifive.com> wrote:
> > On Sat, 5 Jan 2019, G SatishKumar wrote:
> >
> > > 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
> >
> > Why? It's always going to print "0" with this patch. Does the missing
> > line break something?
> >
> > It adds extra info in the /proc/interrupts which provides error count.
> > It is used for printing information.
>
> If this patch kept track of interrupt-related errors, I'd agree. But if
> it always prints 0, as it currently does, then there doesn't seem much
> point?
Yes, it does. This patch gives information of Interrupt error count
in all cases .
Regards
Satish G
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] RISCV:IRQ: Adds Err column to /proc/interrupts
2019-01-08 3:45 ` satish kumar
@ 2019-01-08 4:17 ` Paul Walmsley
0 siblings, 0 replies; 5+ messages in thread
From: Paul Walmsley @ 2019-01-08 4:17 UTC (permalink / raw)
To: satish kumar; +Cc: linux-riscv, Paul Walmsley
[-- Attachment #1: Type: text/plain, Size: 1464 bytes --]
On Tue, 8 Jan 2019, satish kumar wrote:
> On Tue, 8 Jan 2019 at 00:09, Paul Walmsley <paul.walmsley@sifive.com> wrote:
> >
> > On Mon, 7 Jan 2019, satish kumar wrote:
> >
> > > On Mon, 7 Jan 2019 at 12:04, Paul Walmsley <paul.walmsley@sifive.com> wrote:
> > > On Sat, 5 Jan 2019, G SatishKumar wrote:
> > >
> > > > 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
> > >
> > > Why? It's always going to print "0" with this patch. Does the missing
> > > line break something?
> > >
> > > It adds extra info in the /proc/interrupts which provides error count.
> > > It is used for printing information.
> >
> > If this patch kept track of interrupt-related errors, I'd agree. But if
> > it always prints 0, as it currently does, then there doesn't seem much
> > point?
> Yes, it does. This patch gives information of Interrupt error count
> in all cases .
NAK from me until either
1. the patch is modified to increment the IRQ error count when a bad IRQ
occurs, or
2. someone finds a common userspace tool that breaks if the "Err:" field
isn't present
- Paul
[-- Attachment #2: Type: text/plain, Size: 161 bytes --]
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [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).