On Mon, 28 Jul 2014, Rafael J. Wysocki wrote:
> On Sunday, July 27, 2014 05:53:07 PM Rafael J. Wysocki wrote:
>  irqreturn_t
> +do_irqaction(struct irq_desc *desc, struct irqaction *action,
> +          unsigned int irq, void *dev_id)
> +{
> +     irqreturn_t ret;
> +
> +     if (unlikely((desc->istate & IRQS_SHARED_SUSPENDED) &&
> +                  !(action->flags & IRQF_NO_SUSPEND)))
> +             return IRQ_NONE;

I really want to avoid that conditional. We burden it on every
interrupt just to deal with this nonsense.

A simple solution for this is to add irq_desc::action_suspended and
move the shared actions which are not flagged NO_SUSPEND over and
bring them back on resume.

> Index: linux-pm/kernel/irq/spurious.c
> ===================================================================
> --- linux-pm.orig/kernel/irq/spurious.c
> +++ linux-pm/kernel/irq/spurious.c
> @@ -275,6 +275,8 @@ try_misrouted_irq(unsigned int irq, stru
>  void note_interrupt(unsigned int irq, struct irq_desc *desc,
>                   irqreturn_t action_ret)
>  {
> +     int misrouted;
> +
>       if (desc->istate & IRQS_POLL_INPROGRESS ||
>           irq_settings_is_polled(desc))
>               return;
> @@ -384,6 +386,9 @@ void note_interrupt(unsigned int irq, st
>               }
>       }
>  
> +     misrouted = unlikely(try_misrouted_irq(irq, desc, action_ret)) ?
> +                     misrouted_irq(irq) : 0;

If the system is suspended, why would we try misrouted irqs at all?
All non wakeup irqs are disabled, so we just spend a gazillion of
cycles for nothing.

Thanks,

        tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to