From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751701AbbBRNff (ORCPT ); Wed, 18 Feb 2015 08:35:35 -0500 Received: from casper.infradead.org ([85.118.1.10]:39031 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750772AbbBRNfe (ORCPT ); Wed, 18 Feb 2015 08:35:34 -0500 Date: Wed, 18 Feb 2015 14:35:24 +0100 From: Peter Zijlstra To: Lorenzo Pieralisi Cc: "linux-kernel@vger.kernel.org" , "mingo@kernel.org" , "rjw@rjwysocki.net" , "tglx@linutronix.de" , Nicolas Pitre , Russell King Subject: Re: [PATCH 34/35] tick: Provide tick_suspend_local() Message-ID: <20150218133524.GU5029@twins.programming.kicks-ass.net> References: <20150216121435.203983131@infradead.org> <20150216122414.010100318@infradead.org> <20150217143142.GB15881@red-moon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150217143142.GB15881@red-moon> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 17, 2015 at 02:31:42PM +0000, Lorenzo Pieralisi wrote: > On Mon, Feb 16, 2015 at 12:15:09PM +0000, Peter Zijlstra wrote: > > From: Thomas Gleixner > > > > This function is intended to use by the freezer once the freezer folks > > solved their race issues. Also required to get rid of the ARM BL > > switcher tick hackery. > > Totally agree with the patch(es), but I noticed that the ARM bL switcher > does not depend on PM_SLEEP, so I do not think you can compile > tick_{suspend/resume}_local() out if !PM_SLEEP, unless dependency > is enforced by the ARM bL switcher config but I do not think that > the config dependency really exists, Nico please correct me if I am > wrong. Ah I see, the headers seem to do the right thing and declare the function in core (GENERIC_CLOCKEVENTS) with a comment. But then the patch continues defining the functions under PM_SLEEP. I wonder why the build robot has not reported fail on this.. Would the below make sense? --- --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c @@ -368,7 +368,6 @@ void tick_shutdown_local(void) } #endif -#ifdef CONFIG_PM_SLEEP /** * tick_suspend_local - Suspend the local tick device * @@ -384,20 +383,6 @@ void tick_suspend_local(void) } /** - * tick_suspend - Suspend the tick and the broadcast device - * - * Called from syscore_suspend() via timekeeping_suspend with only one - * CPU online and interrupts disabled. - * - * No locks required. Nothing can change the per cpu device. - */ -void tick_suspend(void) -{ - tick_suspend_local(); - tick_suspend_broadcast(); -} - -/** * tick_resume_local - Resume the local tick device * * Called from the local cpu for unfreeze or XEN resume magic @@ -418,6 +403,21 @@ void tick_resume_local(void) } } +#ifdef CONFIG_PM_SLEEP +/** + * tick_suspend - Suspend the tick and the broadcast device + * + * Called from syscore_suspend() via timekeeping_suspend with only one + * CPU online and interrupts disabled. + * + * No locks required. Nothing can change the per cpu device. + */ +void tick_suspend(void) +{ + tick_suspend_local(); + tick_suspend_broadcast(); +} + /** * tick_resume - Resume the tick and the broadcast device *