lkml.org 
[lkml]   [2013]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] irq: enable suspended EARLY_RESUME irqs forcefully if not resumed
On Fri, Jul 19, 2013 at 05:29:16PM +0200, Thomas Gleixner wrote:
> On Tue, 9 Jul 2013, Laxman Dewangan wrote:
> > When system enters into suspend, it disable all irqs in single
> > function call. This disables EARLY_RESUME irqs also along with
> > normal irqs.
> >
> > The EARLY_RESUME irqs get enabled in sys_core_ops->resume and
> > non-EARLY_RESUME irqs get enabled in normal system resume path.
> >
> > When suspend_noirq failed or suspend is aborted for any reason,
> > the EARLY_RESUME irqs do not get enabled as sys_core_ops->resume()
> > call did not happen. It only enables the non-EARLY_RESUME irqs in normal
> > disable for remaining life of system.
> >
> > Add checks on normal irq_resume() whether EARLY_RESUME irqs have been
> > enabled or not and if not then enable it forcefully.
>
> >
> > +static bool early_resume_irq_suspended;
> > +
>
> Instead of doing that status dance, we could simply reenable all
> interrupts in irq_resume(). There's nothing wrong to unmask the few
> IRQF_EARLY_RESUME interrupts again.
>
> Just the XEN ones might be upset. Konrad ?

It should not. I did test it and it ran just fine throught the
gauntlet test - but let me check it with me looking at the console.

>
> Thanks,
>
> tglx
>
> Index: linux-2.6/kernel/irq/pm.c
> ===================================================================
> --- linux-2.6.orig/kernel/irq/pm.c
> +++ linux-2.6/kernel/irq/pm.c
> @@ -50,7 +50,7 @@ static void resume_irqs(bool want_early)
> bool is_early = desc->action &&
> desc->action->flags & IRQF_EARLY_RESUME;
>
> - if (is_early != want_early)
> + if (!is_early && want_early)
> continue;
>
> raw_spin_lock_irqsave(&desc->lock, flags);


\
 
 \ /
  Last update: 2013-07-22 20:41    [W:0.421 / U:0.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site