From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934621AbcCPEwR (ORCPT ); Wed, 16 Mar 2016 00:52:17 -0400 Received: from mail-pf0-f177.google.com ([209.85.192.177]:36383 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752119AbcCPEwO (ORCPT ); Wed, 16 Mar 2016 00:52:14 -0400 Date: Wed, 16 Mar 2016 11:52:09 +0700 From: Viresh Kumar To: "Rafael J. Wysocki" Cc: "Rafael J. Wysocki" , Linux PM list , Linux Kernel Mailing List , Srinivas Pandruvada Subject: Re: [PATCH] cpufreq: Do not schedule policy update work in cpufreq_resume() Message-ID: <20160316045209.GC16250@vireshk-mac-ubuntu> References: <5379622.iJjZa2C2Nq@vostro.rjw.lan> <20160315061059.GB13831@vireshk-mac-ubuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16-03-16, 01:51, Rafael J. Wysocki wrote: > OK, so the problem with doing that in syscore ops is that the I2C bus > needed for it may not be available at that point, which is fair > enough. Not just that. We wouldn't call syscore-ops for the boot-cpu. It never went away. > Still, though, the way it is done now is really awful and has to go. > > I guess something along the lines of cpufreq_update_policy() might be > done in cpufreq_resume() before governors are started, but it might > even be better to set policy->cur from scratch when starting the > governors. Just do driver->get() and set policy->cur to what that > returns (or just use the average of min and max if ->get is not > available). And that unconditionally, regardless of the reason why > the governors are started. I think doing it from a somewhat centric location would make more sense then pushing this for the governors. Maybe the beginning of cpufreq_resume() is good enough for that. -- viresh