[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150309164125.GG5264@atomide.com>
Date: Mon, 9 Mar 2015 09:41:25 -0700
From: Tony Lindgren <tony@...mide.com>
To: Alan Stern <stern@...land.harvard.edu>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Andreas Fenkart <afenkart@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Felipe Balbi <balbi@...com>,
Huiquan Zhong <huiquan.zhong@...el.com>,
Kevin Hilman <khilman@...nel.org>, NeilBrown <neilb@...e.de>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Nishanth Menon <nm@...com>,
Peter Hurley <peter@...leysoftware.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Ulf Hansson <ulf.hansson@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
linux-omap@...r.kernel.org,
Linux PM list <linux-pm@...r.kernel.org>
Subject: Re: [PATCH 1/4] PM / Wakeirq: Add minimal device wakeirq helper
functions
* Alan Stern <stern@...land.harvard.edu> [150309 08:42]:
> On Mon, 9 Mar 2015, Tony Lindgren wrote:
>
> > > > > > Considering the above, should we add a new function something like
> > > > > > pm_resume_complete() that does not need irq_safe set but does
> > > > > > not return until the device has completed resume?
> > > > >
> > > > > That doesn't make sense. You're asking for a routine that is allowed
> > > > > to sleep but can safely be called in interrupt context.
> > > >
> > > > Oh it naturally would not work in irq context, it's for the bottom
> > > > half again.
> > >
> > > In other words, you're suggesting we add a function that runs in
> > > process context and doesn't return until the device is fully resumed?
> > > That's exactly what pm_runtime_resume does right now.
> >
> > But doesn't it only wait for completion if the driver is marked with
> > pm_runtime_irq_safe()?
>
> Put it this way: pm_runtime_resume invokes a ->runtime_resume
> callback routine (the subsystem's or the driver's or whichever), and it
> assumes that if the routine returns 0 then the device has been resumed.
> It doesn't really _wait_ for anything; it just calls the callback
> routine.
>
> It behaves this way whether or not the irq_safe flag is set. The only
> difference is that if irq_safe is set then the callback routine is
> invoked with interrupts disabled (and in this case pm_runtime_resume
> may be called in interrupt context -- normally it can be called only in
> process context).
Oh right you are. Looking at rpm_resume() again, it's the RPM_ASYNC that
was causing problems to me earlier, not the irq_safe. Sorry it seems I
was a bit confused. And yes, pm_runtime_resume() does not set RPM_ASYNC
like you pointed out earlier so no need to do anything there.
Regards,
Tony
--
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