[PATCH] powerpc: warn on spurious irq events (but ratelimited)

Paul Gortmaker paul.gortmaker at windriver.com
Tue Dec 22 10:18:01 AEDT 2015


On Mon, Dec 7, 2015 at 8:38 PM, Paul Gortmaker
<paul.gortmaker at 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 at kernel.crashing.org>
> Cc: Paul Mackerras <paulus at samba.org>
> Cc: Michael Ellerman <mpe at ellerman.id.au>
> Cc: linuxppc-dev at lists.ozlabs.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker at 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 at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev


More information about the Linuxppc-dev mailing list