From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sudeep Holla Subject: Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization Date: Fri, 8 Feb 2019 14:28:12 +0000 Message-ID: <20190208142812.GA22401@e107155-lin> References: <20190207122227.19873-1-m.szyprowski@samsung.com> <20190208064957.zhyue42kpgaoslwm@vireshk-i7> <20190208103133.ysvaroyniuc3k4i5@vireshk-i7> <20190208113904.GB7913@e107155-lin> <20190208120949.GB13043@e107155-lin> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: "Rafael J. Wysocki" Cc: Viresh Kumar , Marek Szyprowski , Linux Kernel Mailing List , Linux PM , Linux Samsung SoC , "Rafael J . Wysocki" , Nishanth Menon , Stephen Boyd , Bartlomiej Zolnierkiewicz , Dave Gerlach , Wolfram Sang List-Id: linux-pm@vger.kernel.org On Fri, Feb 08, 2019 at 01:23:37PM +0100, Rafael J. Wysocki wrote: > On Fri, Feb 8, 2019 at 1:09 PM Sudeep Holla wrote: > > [...] > > Yes, in that case additional logic in the driver also needed. I am fine > > if we enforce driver to deal with this issue, but was thinking if we can > > make it generic. Also I was just trying to avoid adding _suspend/resume > > to driver just to avoid this issue. > > I was wondering if cpufreq_offline()/online() could be invoked from > cpufreq_suspend()/resume() for the nonboot CPUs - if the driver needs > it (there could be a driver flag to indicate that). > > If they are made exit immediately when cpufreq_suspended is set (and > the requisite driver flag is set too), that might work AFAICS. Yes that sounds feasible. It should be fine to assume it's safe to call cpufreq_online on a CPU even for CPU that might have failed to come online or didn't reached a state in CPUHP from where CPUFreq callback is executed or am I missing something ? -- Regards, Sudeep