cpufreq.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: cpufreq@vger.kernel.org
Subject: Another powernow-k6 bug
Date: Wed, 16 Apr 2014 20:23:26 +0100	[thread overview]
Message-ID: <1397676206.5717.7.camel@deadeye.wl.decadent.org.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 794 bytes --]

While looking at your recent powernow-k6 fixes (thanks for those), I
noticed that powernow_k6_cpu_exit() doesn't work properly:

static int powernow_k6_cpu_exit(struct cpufreq_policy *policy)
{
	unsigned int i;
	for (i = 0; i < 8; i++) {
		if (i == max_multiplier)
			powernow_k6_set_state(i);
	}
	cpufreq_frequency_table_put_attr(policy->cpu);
	return 0;
}

As max_multiplier is the actual multiplier * 10, this will never change
the state.  I'm guessing this should be something like:

	for (i = 0; (clock_ratio[i].frequency != CPUFREQ_TABLE_END); i++)
		if (clock_ratio[i].driver_data == max_multiplier)

Ben.

-- 
Ben Hutchings
Kids!  Bringing about Armageddon can be dangerous.  Do not attempt it in
your own home. - Terry Pratchett and Neil Gaiman, `Good Omens'

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

             reply	other threads:[~2014-04-16 19:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16 19:23 Ben Hutchings [this message]
2014-04-21  5:33 ` Another powernow-k6 bug Viresh Kumar
2014-04-21 11:45   ` Ben Hutchings

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=1397676206.5717.7.camel@deadeye.wl.decadent.org.uk \
    --to=ben@decadent.org.uk \
    --cc=cpufreq@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).