From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754471AbbAPLR2 (ORCPT ); Fri, 16 Jan 2015 06:17:28 -0500 Received: from gw-1.arm.linux.org.uk ([78.32.30.217]:44521 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751421AbbAPLR1 (ORCPT ); Fri, 16 Jan 2015 06:17:27 -0500 Date: Fri, 16 Jan 2015 11:17:06 +0000 From: Russell King - ARM Linux To: Sylvain Rochet Cc: Alexandre Belloni , Boris Brezillon , Daniel Lezcano , Nicolas Ferre , linux-kernel@vger.kernel.org, Thomas Gleixner , Maxime Ripard , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] clockevents: don't suspend/resume if unused Message-ID: <20150116111706.GE12302@n2100.arm.linux.org.uk> References: <1421399151-26800-1-git-send-email-alexandre.belloni@free-electrons.com> <20150116092014.GA27945@gradator.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150116092014.GA27945@gradator.net> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 16, 2015 at 10:20:14AM +0100, Sylvain Rochet wrote: > Hello Alexandre, > > > On Fri, Jan 16, 2015 at 10:05:51AM +0100, Alexandre Belloni wrote: > > There is no point in calling suspend/resume for unused > > clockevents as they are already stopped and disabled. > > > > Furthermore, it can take some time to wait for some IPs to stop counting. > > > > Signed-off-by: Alexandre Belloni > > Reported-by: Sylvain Rochet > > Indeed, this is way better from what I did. > > > > + if (dev->suspend && dev->mode != CLOCK_EVT_MODE_UNUSED) > > I wonder if we should use > CLOCK_EVT_MODE_SHUTDOWN > (or CLOCK_EVT_MODE_UNUSED || CLOCK_EVT_MODE_SHUTDOWN) instead of > !CLOCK_EVT_MODE_UNUSED. Definitely - consider the effect of the original patch set on a clock source which is being used, has PM support, but does not have an ->enable callback. -- FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net.