From mboxrd@z Thu Jan 1 00:00:00 1970 From: Preeti U Murthy Subject: Re: [PATCH] cpufreq: powernv: Register the driver with reboot notifier Date: Fri, 22 Aug 2014 08:18:06 +0530 Message-ID: <53F6AF66.10204@linux.vnet.ibm.com> References: <1408015178-21745-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com> <53F57E51.4060200@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: Received: from e35.co.us.ibm.com ([32.97.110.153]:50261 "EHLO e35.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755553AbaHVCsP (ORCPT ); Thu, 21 Aug 2014 22:48:15 -0400 Received: from /spool/local by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 21 Aug 2014 20:48:15 -0600 In-Reply-To: Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Viresh Kumar , Shilpasri G Bhat Cc: "linux-pm@vger.kernel.org" , "Rafael J. Wysocki" , Linux Kernel Mailing List , Shilpasri G Bhat , "linuxppc-dev@lists.ozlabs.org" Hi Viresh, On 08/21/2014 11:56 AM, Viresh Kumar wrote: > On 21 August 2014 10:36, Shilpasri G Bhat wrote: >> The intention here is stop the cpufreq governor and then to set the cpus to >> nominal frequency so as to ensure that the frequency won't be changed later. >> >> The .suspend callback of the driver is not called during reboot/kexec. >> So we need an explicit reboot notifier to call cpufreq-suspend() to >> suffice the requirement. > > Hi Shilpa, > > No, we can't allow any platform driver to misuse cpufreq_suspend(). > Platform drivers aren't *allowed* to call this routine. At the moment this looks like the best way forward. We need to do this cleanly by ensuring that we stop the governors and then call into the driver to deal with the cpu frequency in its own way during reboot. The best way to do this would be by calling this routine. Either this or cpufreq_suspend() should be called in the reboot path generically. The latter might not be an enticing option for other platforms. Regards Preeti U Murthy > > Now the deal is how do we move to nominal frequency on reboot.. > @Rafael: Any suggestions? How do we ensure that governors > are stopped on these notifiers, or if there is some other solution here? > _______________________________________________ > Linuxppc-dev mailing list > Linuxppc-dev@lists.ozlabs.org > https://lists.ozlabs.org/listinfo/linuxppc-dev > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e38.co.us.ibm.com (e38.co.us.ibm.com [32.97.110.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 024291A01C4 for ; Fri, 22 Aug 2014 12:48:15 +1000 (EST) Received: from /spool/local by e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 21 Aug 2014 20:48:13 -0600 Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id DDF9A1FF003E for ; Thu, 21 Aug 2014 20:48:10 -0600 (MDT) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s7M2mB5822872206 for ; Fri, 22 Aug 2014 04:48:11 +0200 Received: from d03av02.boulder.ibm.com (localhost [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s7M2mB8W004387 for ; Thu, 21 Aug 2014 20:48:11 -0600 Message-ID: <53F6AF66.10204@linux.vnet.ibm.com> Date: Fri, 22 Aug 2014 08:18:06 +0530 From: Preeti U Murthy MIME-Version: 1.0 To: Viresh Kumar , Shilpasri G Bhat , "Rafael J. Wysocki" Subject: Re: [PATCH] cpufreq: powernv: Register the driver with reboot notifier References: <1408015178-21745-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com> <53F57E51.4060200@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Cc: "linuxppc-dev@lists.ozlabs.org" , "Rafael J. Wysocki" , Linux Kernel Mailing List , Shilpasri G Bhat , "linux-pm@vger.kernel.org" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi Viresh, On 08/21/2014 11:56 AM, Viresh Kumar wrote: > On 21 August 2014 10:36, Shilpasri G Bhat wrote: >> The intention here is stop the cpufreq governor and then to set the cpus to >> nominal frequency so as to ensure that the frequency won't be changed later. >> >> The .suspend callback of the driver is not called during reboot/kexec. >> So we need an explicit reboot notifier to call cpufreq-suspend() to >> suffice the requirement. > > Hi Shilpa, > > No, we can't allow any platform driver to misuse cpufreq_suspend(). > Platform drivers aren't *allowed* to call this routine. At the moment this looks like the best way forward. We need to do this cleanly by ensuring that we stop the governors and then call into the driver to deal with the cpu frequency in its own way during reboot. The best way to do this would be by calling this routine. Either this or cpufreq_suspend() should be called in the reboot path generically. The latter might not be an enticing option for other platforms. Regards Preeti U Murthy > > Now the deal is how do we move to nominal frequency on reboot.. > @Rafael: Any suggestions? How do we ensure that governors > are stopped on these notifiers, or if there is some other solution here? > _______________________________________________ > Linuxppc-dev mailing list > Linuxppc-dev@lists.ozlabs.org > https://lists.ozlabs.org/listinfo/linuxppc-dev > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755728AbaHVCsR (ORCPT ); Thu, 21 Aug 2014 22:48:17 -0400 Received: from e35.co.us.ibm.com ([32.97.110.153]:50262 "EHLO e35.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755629AbaHVCsP (ORCPT ); Thu, 21 Aug 2014 22:48:15 -0400 Message-ID: <53F6AF66.10204@linux.vnet.ibm.com> Date: Fri, 22 Aug 2014 08:18:06 +0530 From: Preeti U Murthy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Viresh Kumar , Shilpasri G Bhat , "Rafael J. Wysocki" CC: "linux-pm@vger.kernel.org" , "Rafael J. Wysocki" , Linux Kernel Mailing List , Shilpasri G Bhat , "linuxppc-dev@lists.ozlabs.org" Subject: Re: [PATCH] cpufreq: powernv: Register the driver with reboot notifier References: <1408015178-21745-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com> <53F57E51.4060200@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14082202-6688-0000-0000-00000432FEAF Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Viresh, On 08/21/2014 11:56 AM, Viresh Kumar wrote: > On 21 August 2014 10:36, Shilpasri G Bhat wrote: >> The intention here is stop the cpufreq governor and then to set the cpus to >> nominal frequency so as to ensure that the frequency won't be changed later. >> >> The .suspend callback of the driver is not called during reboot/kexec. >> So we need an explicit reboot notifier to call cpufreq-suspend() to >> suffice the requirement. > > Hi Shilpa, > > No, we can't allow any platform driver to misuse cpufreq_suspend(). > Platform drivers aren't *allowed* to call this routine. At the moment this looks like the best way forward. We need to do this cleanly by ensuring that we stop the governors and then call into the driver to deal with the cpu frequency in its own way during reboot. The best way to do this would be by calling this routine. Either this or cpufreq_suspend() should be called in the reboot path generically. The latter might not be an enticing option for other platforms. Regards Preeti U Murthy > > Now the deal is how do we move to nominal frequency on reboot.. > @Rafael: Any suggestions? How do we ensure that governors > are stopped on these notifiers, or if there is some other solution here? > _______________________________________________ > Linuxppc-dev mailing list > Linuxppc-dev@lists.ozlabs.org > https://lists.ozlabs.org/listinfo/linuxppc-dev >