All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: warn on spurious irq events (but ratelimited)
@ 2015-12-08  1:38 Paul Gortmaker
  2015-12-21 23:18 ` Paul Gortmaker
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Gortmaker @ 2015-12-08  1:38 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: Paul Gortmaker, Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman

It might be worth warning on spurious IRQ events; they might
point someone at a bogus DTS value or similar.

But ratelimit them to ensure we aren't too spammy about it.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 arch/powerpc/kernel/irq.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 290559df1e8b..5c777e3a4c04 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -497,10 +497,12 @@ void __do_irq(struct pt_regs *regs)
 	may_hard_irq_enable();
 
 	/* And finally process it */
-	if (unlikely(irq == NO_IRQ))
+	if (unlikely(irq == NO_IRQ)) {
+		printk_ratelimited(KERN_WARNING "spurious irq on %d\n", irq);
 		__this_cpu_inc(irq_stat.spurious_irqs);
-	else
+	} else {
 		generic_handle_irq(irq);
+	}
 
 	trace_irq_exit(regs);
 
-- 
2.6.1

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

* Re: [PATCH] powerpc: warn on spurious irq events (but ratelimited)
  2015-12-08  1:38 [PATCH] powerpc: warn on spurious irq events (but ratelimited) Paul Gortmaker
@ 2015-12-21 23:18 ` Paul Gortmaker
  2015-12-22  0:10   ` Michael Ellerman
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Gortmaker @ 2015-12-21 23:18 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Paul Gortmaker, Paul Mackerras

On Mon, Dec 7, 2015 at 8:38 PM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:
> It might be worth warning on spurious IRQ events; they might
> point someone at a bogus DTS value or similar.
>
> But ratelimit them to ensure we aren't too spammy about it.
>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
>  arch/powerpc/kernel/irq.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
> index 290559df1e8b..5c777e3a4c04 100644
> --- a/arch/powerpc/kernel/irq.c
> +++ b/arch/powerpc/kernel/irq.c
> @@ -497,10 +497,12 @@ void __do_irq(struct pt_regs *regs)
>         may_hard_irq_enable();
>
>         /* And finally process it */
> -       if (unlikely(irq == NO_IRQ))
> +       if (unlikely(irq == NO_IRQ)) {
> +               printk_ratelimited(KERN_WARNING "spurious irq on %d\n", irq);

If we did decide we cared about this patch, then no need for "irq" above, as
we already know it is equal to NO_IRQ.

Paul.
--

>                 __this_cpu_inc(irq_stat.spurious_irqs);
> -       else
> +       } else {
>                 generic_handle_irq(irq);
> +       }
>
>         trace_irq_exit(regs);
>
> --
> 2.6.1
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev

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

* Re: [PATCH] powerpc: warn on spurious irq events (but ratelimited)
  2015-12-21 23:18 ` Paul Gortmaker
@ 2015-12-22  0:10   ` Michael Ellerman
  2015-12-22  0:21     ` Paul Gortmaker
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Ellerman @ 2015-12-22  0:10 UTC (permalink / raw)
  To: Paul Gortmaker, linuxppc-dev; +Cc: Paul Mackerras

On Mon, 2015-12-21 at 18:18 -0500, Paul Gortmaker wrote:
> On Mon, Dec 7, 2015 at 8:38 PM, Paul Gortmaker
> <paul.gortmaker@windriver.com> wrote:
> > It might be worth warning on spurious IRQ events; they might
> > point someone at a bogus DTS value or similar.
> > 
> > But ratelimit them to ensure we aren't too spammy about it.
> > 
> > Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > Cc: Paul Mackerras <paulus@samba.org>
> > Cc: Michael Ellerman <mpe@ellerman.id.au>
> > Cc: linuxppc-dev@lists.ozlabs.org
> > Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> > ---
> >  arch/powerpc/kernel/irq.c | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
> > index 290559df1e8b..5c777e3a4c04 100644
> > --- a/arch/powerpc/kernel/irq.c
> > +++ b/arch/powerpc/kernel/irq.c
> > @@ -497,10 +497,12 @@ void __do_irq(struct pt_regs *regs)
> >         may_hard_irq_enable();
> > 
> >         /* And finally process it */
> > -       if (unlikely(irq == NO_IRQ))
> > +       if (unlikely(irq == NO_IRQ)) {
> > +               printk_ratelimited(KERN_WARNING "spurious irq on %d\n", irq);
> 
> If we did decide we cared about this patch, then no need for "irq" above, as
> we already know it is equal to NO_IRQ.

I'm not convinced it's worth printing, we already have a counter in proc.

I think it's more likely to just lead to console spam.

But maybe I'm wrong and you can convince me otherwise :)

cheers

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

* Re: [PATCH] powerpc: warn on spurious irq events (but ratelimited)
  2015-12-22  0:10   ` Michael Ellerman
@ 2015-12-22  0:21     ` Paul Gortmaker
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Gortmaker @ 2015-12-22  0:21 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev, Paul Mackerras

[Re: [PATCH] powerpc: warn on spurious irq events (but ratelimited)] On 22/12/2015 (Tue 11:10) Michael Ellerman wrote:

> On Mon, 2015-12-21 at 18:18 -0500, Paul Gortmaker wrote:
> > On Mon, Dec 7, 2015 at 8:38 PM, Paul Gortmaker
> > <paul.gortmaker@windriver.com> wrote:
> > > It might be worth warning on spurious IRQ events; they might
> > > point someone at a bogus DTS value or similar.
> > > 

[...]

> > 
> > If we did decide we cared about this patch, then no need for "irq" above, as
> > we already know it is equal to NO_IRQ.
> 
> I'm not convinced it's worth printing, we already have a counter in proc.
> 
> I think it's more likely to just lead to console spam.
> 
> But maybe I'm wrong and you can convince me otherwise :)

I'm not sure I can even convince myself, let alone others.   :)

Feel free to bin it.

Paul.
--

> 
> cheers
> 

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

end of thread, other threads:[~2015-12-22  0:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-08  1:38 [PATCH] powerpc: warn on spurious irq events (but ratelimited) Paul Gortmaker
2015-12-21 23:18 ` Paul Gortmaker
2015-12-22  0:10   ` Michael Ellerman
2015-12-22  0:21     ` Paul Gortmaker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.