Re: xen: IPI interrupts not resumed early enough on suspend/resume

From: Thomas Gleixner
Date: Fri Oct 07 2011 - 12:30:08 EST


On Fri, 7 Oct 2011, Ian Campbell wrote:
> On Mon, 2011-10-03 at 22:35 +0200, Thomas Gleixner wrote:
> /**
> + * irq_pm_syscore_ops - enable interrupt lines early
> + *
> + * Enable all interrupt lines with %IRQF_EARLY_RESUME set
> + */
> +static void irq_pm_syscore_resume(void)
> +{
> + struct irq_desc *desc;
> + int irq;
> +
> + for_each_irq_desc(irq, desc) {
> + unsigned long flags;
> +
> + if (!desc->action || !(desc->action->flags & IRQF_EARLY_RESUME))
> + continue;
> +
> + raw_spin_lock_irqsave(&desc->lock, flags);
> + __enable_irq(desc, irq, true);
> + raw_spin_unlock_irqrestore(&desc->lock, flags);
> + }
> +}

Come on, this is a full copy of resume_device_irqs(). What about
having a common function with an (bool early) argument and call it
from both syscore and resume_device?

Thanks,

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