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=-6.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_NEOMUTT 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 63173C04E84 for ; Wed, 15 May 2019 10:57:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 32C5420843 for ; Wed, 15 May 2019 10:57:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726347AbfEOK53 (ORCPT ); Wed, 15 May 2019 06:57:29 -0400 Received: from foss.arm.com ([217.140.101.70]:40662 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725953AbfEOK53 (ORCPT ); Wed, 15 May 2019 06:57:29 -0400 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 543A580D; Wed, 15 May 2019 03:57:28 -0700 (PDT) Received: from queper01-lin (queper01-lin.cambridge.arm.com [10.1.195.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C83613F703; Wed, 15 May 2019 03:57:25 -0700 (PDT) Date: Wed, 15 May 2019 11:57:24 +0100 From: Quentin Perret To: Daniel Lezcano Cc: Viresh Kumar , edubezval@gmail.com, rui.zhang@intel.com, javi.merino@kernel.org, amit.kachhap@gmail.com, rjw@rjwysocki.net, will.deacon@arm.com, catalin.marinas@arm.com, dietmar.eggemann@arm.com, ionela.voinescu@arm.com, mka@chromium.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v4 2/3] PM / EM: Expose perf domain struct Message-ID: <20190515105723.3ltui3l75hbuskmk@queper01-lin> References: <20190515082318.7993-1-quentin.perret@arm.com> <20190515082318.7993-3-quentin.perret@arm.com> <0ced18eb-e424-fe6b-b11e-165a3c108170@linaro.org> <20190515091658.sbpg6qiovhtblqyr@queper01-lin> <698400c0-e0a4-4a86-b9df-cdb9bd683c0f@linaro.org> <20190515100748.q3t4kt72h2akdpcs@queper01-lin> <20190515102200.s6uq63qnwea6xtpl@vireshk-i7> <20190515104043.vogspxgkapp6qsny@queper01-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 15 May 2019 at 12:54:10 (+0200), Daniel Lezcano wrote: > On 15/05/2019 12:40, Quentin Perret wrote: > > On Wednesday 15 May 2019 at 15:52:00 (+0530), Viresh Kumar wrote: > >> On 15-05-19, 12:16, Daniel Lezcano wrote: > >>> Viresh what do you think ? > >> > >> I agree with your last suggestions. They do make sense. > > > > Good :-) > > > > So, FWIW, the below compiles w/ or w/o THERMAL_GOV_POWER_ALLOCATOR. I'll > > test it and clean it up some more and put it as patch 1 in the series if > > that's OK. > > > > Thanks, > > Quentin > > > > > > diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c > > index f7c1f49ec87f..ee431848ef71 100644 > > --- a/drivers/thermal/cpu_cooling.c > > +++ b/drivers/thermal/cpu_cooling.c > > @@ -58,7 +58,9 @@ > > */ > > struct freq_table { > > u32 frequency; > > I suspect we will have a problem here as cpufreq_set_cur_state uses the > frequency and when switching to EM, we will still need a freq table. Indeed, I'll need a bit of ifdefery in the get_state_freq() function introduced in patch 3, but nothing too horrible I hope. Thanks, Quentin