Re: [PATCH 4/6] PM / sleep: Make it possible to quiesce timers during suspend-to-idle

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

 



On Thursday, February 12, 2015 02:24:47 PM Peter Zijlstra wrote:
> On Wed, Feb 11, 2015 at 05:03:44AM +0100, Rafael J. Wysocki wrote:
> > Index: linux-pm/include/linux/cpuidle.h
> > ===================================================================
> > --- linux-pm.orig/include/linux/cpuidle.h
> > +++ linux-pm/include/linux/cpuidle.h
> > @@ -50,6 +50,10 @@ struct cpuidle_state {
> >  			int index);
> >  
> >  	int (*enter_dead) (struct cpuidle_device *dev, int index);
> 
> Do we want a comment here describing that enter_freeze() must not
> re-enable interrupts _ever_?
> 
> To help people who want to enable this on their platform.

Good point.

I'll update the patch later today.

> > +
> > +	void (*enter_freeze) (struct cpuidle_device *dev,
> > +			      struct cpuidle_driver *drv,
> > +			      int index);
> >  };
> 
> > +static void enter_freeze_proper(struct cpuidle_driver *drv,
> > +				struct cpuidle_device *dev, int index)
> > +{
> > +	tick_freeze();
> > +	/*
> > +	 * The state used here cannot be a "coupled" one, because the "coupled"
> > +	 * cpuidle mechanism enables interrupts and doing that with timekeeping
> > +	 * suspended is generally unsafe.
> > +	 */
> > +	drv->states[index].enter_freeze(dev, drv, index);
> 
> 	WARN_ON(!irqs_disabled());
> 
> To go along with the comment and catch fail?

Yeah, will do.

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux