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

From: Ian Campbell
Date: Mon Oct 10 2011 - 09:06:33 EST


On Fri, 2011-10-07 at 17:29 +0100, Thomas Gleixner wrote:
> 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?

Yes, that's a good idea.