From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752461AbbJaCFF (ORCPT ); Fri, 30 Oct 2015 22:05:05 -0400 Received: from v094114.home.net.pl ([79.96.170.134]:58686 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751833AbbJaCFC (ORCPT ); Fri, 30 Oct 2015 22:05:02 -0400 From: "Rafael J. Wysocki" To: "Jon Medhurst (Tixy)" Cc: Viresh Kumar , Sudeep Holla , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Turquette Subject: Re: [PATCH v2] cpufreq: arm_big_little: fix frequency check when bL switcher is active Date: Sat, 31 Oct 2015 03:34:05 +0100 Message-ID: <11584056.2Z0CdQiHeS@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/4.1.0-rc5+; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1446202098.2815.8.camel@linaro.org> References: <1445421333.2916.13.camel@linaro.org> <20151021095725.GA7784@ubuntu> <1446202098.2815.8.camel@linaro.org> 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 Friday, October 30, 2015 10:48:18 AM Jon Medhurst wrote: > On Wed, 2015-10-21 at 15:27 +0530, Viresh Kumar wrote: > > On 21-10-15, 10:55, Jon Medhurst (Tixy) wrote: > > > The check for correct frequency being set in bL_cpufreq_set_rate is > > > broken when the big.LITTLE switcher is active, for two reasons. > > > > > > 1. The 'new_rate' variable gets overwritten before the test by the > > > code calculating the frequency of the old cluster. > > > > > > 2. The frequency returned by bL_cpufreq_get_rate will be the virtual > > > frequency, not the actual one the intended version of new_rate contains. > > > > > > This means the function always returns an error causing an endless > > > stream of: "cpufreq: __target_index: Failed to change cpu frequency: -5" > > > > > > As the intent is to check for errors that clk_set_rate doesn't report > > > lets move the check to immediately after that and directly use > > > clk_get_rate, rather than the arm_big_little helpers which only confuse > > > matters. Also, update the comment to be hopefully clearer about the > > > purpose of the code. > > > > > > Fixes: 0a95e630b49a ("cpufreq: arm_big_little: check if the frequency is set correctly") > > > > > > Signed-off-by: Jon Medhurst > > > Acked-by: Sudeep Holla > > > --- > > > > [...] > > > > Acked-by: Viresh Kumar > > > > Do I need to send this again with that Ack and Michael's Reviewed-by > added? Nope, it's on my to-do list. Thanks, Rafael