Re: [PATCH] PM: runtime PM + idle: allow usage when interrupts are disabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: linux-omap-owner@xxxxxxxxxxxxxxx [mailto:linux-omap-
> owner@xxxxxxxxxxxxxxx] On Behalf Of Rafael J. Wysocki
> Sent: Tuesday, August 17, 2010 2:48 AM
> To: Kevin Hilman
> Cc: linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx; linux-omap@xxxxxxxxxxxxxxx; Alan
> Stern; Ming Lei
> Subject: Re:  [PATCH] PM: runtime PM + idle: allow usage when
> interrupts are disabled
> 
> On Tuesday, August 10, 2010, Kevin Hilman wrote:
> > When using runtime PM in combination with CPUidle, the runtime PM
> > transtions of some devices may be triggered during the idle path.
> > Late in the idle sequence, interrupts will likely be disabled when
> > runtime PM for these devices is initiated.
> >
> > Currently, the runtime PM core assumes methods are called with
> > interrupts enabled.  However, if it is called with interrupts
> > disabled, the internal locking unconditionally enables interrupts, for
> > example:
> >
> > pm_runtime_put_sync()
> 
> Please don't use that from interrupt context.  There's pm_runtime_put()
> exactly for this purpose that puts the _idle() call into a workqueue.

Rafael, we execute this little before executing idle instruction with interrupts locked. So, we cannot call pm_runtime_put() as we want it to take effect immediately.
Kevin??

> 
> >     __pm_runtime_put()
> >         pm_runtime_idle()
> >             spin_lock_irq()
> >             __pm_runtime_idle()
> >                 spin_unlock_irq()   <--- interrupts unconditionally
> enabled
> 
> That's because __pm_runtime_idle() has to be called from process context.
> 
> >                 dev->bus->pm->runtime_idle()
> >                 spin_lock_irq()
> >              spin_unlock_irq()
> 
> Thanks,
> Rafael
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux