[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.02.1110071822160.3240@ionos>
Date: Fri, 7 Oct 2011 18:29:56 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Ian Campbell <Ian.Campbell@...citrix.com>
cc: Jeremy Fitzhardinge <Jeremy.Fitzhardinge@...rix.com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
xen-devel <xen-devel@...ts.xensource.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
"Rafael J. Wysocki" <rjw@...k.pl>
Subject: Re: xen: IPI interrupts not resumed early enough on suspend/resume
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists