powerpc: warn on spurious irq events (but ratelimited)
PATCH 1/1 powerpc: warn on spurious irq events (but ratelimited)
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.
--- arch/powerpc/kernel/irq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
arch/powerpc/kernel/irq.c +4 -2
@@ -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);
Signature · 1 line
2.6.1
Quoted 19 lines · Paul Gortmaker
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 <[email protected]>Cc Paul Mackerras <[email protected]>Cc Michael Ellerman <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>--- arch/powerpc/kernel/irq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)arch/powerpc/kernel/irq.c +0
-0
arch/powerpc/kernel/irq.c void __do_irq(struct pt_regs *regs) · line 501
Quoted 6 lines
arch/powerpc/kernel/irq.c +2
-1@@ -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.
--
Quoted 15 lines
arch/powerpc/kernel/irq.c +2
-2__this_cpu_inc (irq_stat.spurious_irqs); - else + }else {generic_handle_irq (irq); + }trace_irq_exit (regs); --2.6.1
_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev
Quoted 23 lines · Paul Gortmaker
Quoted 21 lines · Paul Gortmaker
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 <[email protected]>Cc Paul Mackerras <[email protected]>Cc Michael Ellerman <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>--- arch/powerpc/kernel/irq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)arch/powerpc/kernel/irq.c +0
-0@@ -497,10 +497,12 @@ void __do_irq(struct pt_regs *regs)may_hard_irq_enable ();
Quoted 7 lines
arch/powerpc/kernel/irq.c void __do_irq(struct pt_regs *regs) · line 501
Quoted 4 lines
arch/powerpc/kernel/irq.c +2
-1/* 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
Quoted 6 lines · [Re: [PATCH] powerpc: warn on spurious irq events (but ratelimited)] On…
Quoted 5 lines · Paul Gortmaker
Quoted 3 lines · Paul Gortmaker
It might be worth warning on spurious IRQ events; they might point someone at a bogus DTS value or similar.
[...]
Quoted 9 lines
Quoted 3 lines
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.
--
Quoted 3 lines
cheers