From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 663D5C169C4 for ; Fri, 8 Feb 2019 14:28:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 38CCC20869 for ; Fri, 8 Feb 2019 14:28:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727742AbfBHO2W (ORCPT ); Fri, 8 Feb 2019 09:28:22 -0500 Received: from foss.arm.com ([217.140.101.70]:52202 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726887AbfBHO2W (ORCPT ); Fri, 8 Feb 2019 09:28:22 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9F981A78; Fri, 8 Feb 2019 06:28:21 -0800 (PST) Received: from e107155-lin (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8A6193F557; Fri, 8 Feb 2019 06:28:19 -0800 (PST) Date: Fri, 8 Feb 2019 14:28:12 +0000 From: Sudeep Holla 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 Subject: Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization 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 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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