public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Laxman Dewangan <ldewangan@nvidia.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: [PATCH] irq: enable suspended EARLY_RESUME irqs forcefully if not resumed
Date: Mon, 22 Jul 2013 15:32:08 -0400	[thread overview]
Message-ID: <20130722193208.GA22334@phenom.dumpdata.com> (raw)
In-Reply-To: <20130722154934.GD30300@phenom.dumpdata.com>

On Mon, Jul 22, 2013 at 11:49:34AM -0400, Konrad Rzeszutek Wilk wrote:
> 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.

It is good. You can add an Acked-by-and-Tested-by from me if you would
like. Thanks!
> 
> > 
> > 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);

  reply	other threads:[~2013-07-22 19:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-09 14:32 [PATCH] irq: enable suspended EARLY_RESUME irqs forcefully if not resumed Laxman Dewangan
2013-07-19 14:00 ` Laxman Dewangan
2013-07-19 15:29 ` Thomas Gleixner
2013-07-22 15:49   ` Konrad Rzeszutek Wilk
2013-07-22 19:32     ` Konrad Rzeszutek Wilk [this message]
2013-07-31 14:10       ` Laxman Dewangan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130722193208.GA22334@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox