From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755921AbbBLP4c (ORCPT ); Thu, 12 Feb 2015 10:56:32 -0500 Received: from v094114.home.net.pl ([79.96.170.134]:54805 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1755302AbbBLP4b (ORCPT ); Thu, 12 Feb 2015 10:56:31 -0500 From: "Rafael J. Wysocki" To: Peter Zijlstra Cc: Thomas Gleixner , Alan Cox , "Li, Aubrey" , LKML , Linux PM list , ACPI Devel Maling List , Kristen Carlson Accardi , John Stultz , Len Brown Subject: Re: [PATCH 4/6] PM / sleep: Make it possible to quiesce timers during suspend-to-idle Date: Thu, 12 Feb 2015 17:19:37 +0100 Message-ID: <2993185.7BWIy7QjJ9@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/3.16.0-rc5+; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20150212132447.GX23123@twins.programming.kicks-ass.net> References: <8292243.ibkmfVtXac@vostro.rjw.lan> <3761728.YL7DDdWRW2@vostro.rjw.lan> <20150212132447.GX23123@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.