Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752456AbdGJGkP (ORCPT ); Mon, 10 Jul 2017 02:40:15 -0400 Received: from mail-pg0-f41.google.com ([74.125.83.41]:35290 "EHLO mail-pg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751045AbdGJGkN (ORCPT ); Mon, 10 Jul 2017 02:40:13 -0400 Date: Mon, 10 Jul 2017 12:10:10 +0530 From: Viresh Kumar To: Dietmar Eggemann Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux@arm.linux.org.uk, Greg Kroah-Hartman , Russell King , Catalin Marinas , Will Deacon , Juri Lelli , Vincent Guittot , Peter Zijlstra , Morten Rasmussen , "Rafael J . Wysocki" Subject: Re: [PATCH v2 02/10] cpufreq: provide data for frequency-invariant load-tracking support Message-ID: <20170710064010.GF2928@vireshk-i7> References: <20170706094948.8779-1-dietmar.eggemann@arm.com> <20170706094948.8779-3-dietmar.eggemann@arm.com> <20170706104027.GB13048@vireshk-i7> 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 Content-Length: 1322 Lines: 31 On 07-07-17, 17:01, Dietmar Eggemann wrote: > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c > index 9bf97a366029..77c4d5e7a598 100644 > --- a/drivers/cpufreq/cpufreq.c > +++ b/drivers/cpufreq/cpufreq.c > @@ -301,6 +301,12 @@ static void adjust_jiffies(unsigned long val, struct cpufreq_freqs *ci) > #endif > } > > +#ifndef arch_set_freq_scale > +static void arch_set_freq_scale(struct cpumask *cpus, unsigned long cur_freq, > + unsigned long max_freq) > +{} > +#endif > + > static void __cpufreq_notify_transition(struct cpufreq_policy *policy, > struct cpufreq_freqs *freqs, unsigned int state) > { > @@ -343,6 +349,8 @@ static void __cpufreq_notify_transition(struct cpufreq_policy *policy, > CPUFREQ_POSTCHANGE, freqs); > if (likely(policy) && likely(policy->cpu == freqs->cpu)) > policy->cur = freqs->new; > + arch_set_freq_scale(policy->related_cpus, policy->cur, > + policy->cpuinfo.max_freq); This function gets called for-each-cpu-in-policy, so you don't need the first argument. And the topology code already has max_freq, so not sure if you need the last parameter as well, specially for the ARM solution. -- viresh