From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765141AbcIOAoF (ORCPT ); Wed, 14 Sep 2016 20:44:05 -0400 Received: from cloudserver094114.home.net.pl ([79.96.170.134]:54714 "HELO cloudserver094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1762727AbcIOAoB (ORCPT ); Wed, 14 Sep 2016 20:44:01 -0400 From: "Rafael J. Wysocki" To: Hoan Tran Cc: Viresh Kumar , pprakash@codeaurora.org, Al Stone , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, lho@apm.com, Duc Dang Subject: Re: [PATCH] cpufreq: CPPC: Avoid overflow when calculating desired_perf Date: Thu, 15 Sep 2016 02:50:09 +0200 Message-ID: <2037077.Sk8HnobN5X@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/4.8.0-rc2+; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1473894508-22270-1-git-send-email-hotran@apm.com> References: <1473894508-22270-1-git-send-email-hotran@apm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, September 14, 2016 04:08:28 PM Hoan Tran wrote: > This patch fixes overflow issue when calculating the desired_perf. > > Signed-off-by: Hoan Tran > --- > drivers/cpufreq/cppc_cpufreq.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c > index 894e465..3e0961e 100644 > --- a/drivers/cpufreq/cppc_cpufreq.c > +++ b/drivers/cpufreq/cppc_cpufreq.c > @@ -84,7 +84,8 @@ static int cppc_cpufreq_set_target(struct cpufreq_policy *policy, > > cpu = all_cpu_data[policy->cpu]; > > - cpu->perf_ctrls.desired_perf = target_freq * policy->max / cppc_dmi_max_khz; > + cpu->perf_ctrls.desired_perf = > + (u64)target_freq * policy->max / cppc_dmi_max_khz; > freqs.old = policy->cur; > freqs.new = target_freq; That's on top of the CPPC material in linux-next I gather? Which commit does it fix? Thanks, Rafael