linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jon Medhurst (Tixy)" <tixy@linaro.org>
To: Viresh Kumar <viresh.kumar@linaro.org>,
	Sudeep Holla <sudeep.holla@arm.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Michael Turquette <mike.turquette@linaro.org>
Subject: [PATCH] cpufreq: arm_big_little: fix frequency check when bL switcher is active
Date: Fri, 02 Oct 2015 18:38:52 +0100	[thread overview]
Message-ID: <1443807532.2845.25.camel@linaro.org> (raw)

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 comment for the test indicates that it is temporary and limited
lets not bother fixing it to work when the bL switcher is active and
instead just bypass the test in that case.

Fixes: 0a95e630b49a ("cpufreq: arm_big_little: check if the frequency is set correctly")

Signed-off-by: Jon Medhurst <tixy@linaro.org>
---
 drivers/cpufreq/arm_big_little.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c
index f1e42f8..71deddb 100644
--- a/drivers/cpufreq/arm_big_little.c
+++ b/drivers/cpufreq/arm_big_little.c
@@ -196,7 +196,7 @@ bL_cpufreq_set_rate(u32 cpu, u32 old_cluster, u32 new_cluster, u32 rate)
 	 * be reading only the cached value anyway. This needs to  be removed
 	 * once clk core is fixed.
 	 */
-	if (bL_cpufreq_get_rate(cpu) != new_rate)
+	if (!bLs && bL_cpufreq_get_rate(cpu) != new_rate)
 		return -EIO;
 	return 0;
 }
-- 
2.1.4

             reply	other threads:[~2015-10-02 17:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-02 17:38 Jon Medhurst (Tixy) [this message]
2015-10-07 17:39 ` [PATCH] cpufreq: arm_big_little: fix frequency check when bL switcher is active Viresh Kumar
2015-10-08  9:23   ` Jon Medhurst (Tixy)
2015-10-08 11:24     ` Viresh Kumar
2015-10-08 12:55       ` Jon Medhurst (Tixy)
2015-10-08 13:52         ` Viresh Kumar
2015-10-08 14:18         ` Sudeep Holla
2015-10-12 13:20     ` Sudeep Holla
2015-10-13  7:19       ` Jon Medhurst (Tixy)
2015-10-13 10:36         ` Sudeep Holla
2015-10-14  7:12           ` Jon Medhurst (Tixy)
2015-10-14  8:48             ` Sudeep Holla
2015-10-19  8:33               ` Jon Medhurst (Tixy)
2015-10-19  8:44                 ` Sudeep Holla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1443807532.2845.25.camel@linaro.org \
    --to=tixy@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mike.turquette@linaro.org \
    --cc=rjw@rjwysocki.net \
    --cc=sudeep.holla@arm.com \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).