From: Thomas Gleixner Subject: Re: xen: IPI interrupts not resumed early enough on suspend/resume Date: Fri, 7 Oct 2011 18:29:56 +0200 (CEST) Message-ID: References: <1317654626.21903.72.camel@zakaz.uk.xensource.com> <1317668908.11991.20.camel@dagon.hellion.org.uk> <1318001583.21903.355.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: In-Reply-To: <1318001583.21903.355.camel@zakaz.uk.xensource.com> Sender: linux-kernel-owner@vger.kernel.org To: Ian Campbell Cc: Jeremy Fitzhardinge , Konrad Rzeszutek Wilk , xen-devel , linux-kernel , "Rafael J. Wysocki" List-Id: xen-devel@lists.xenproject.org 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