mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vojtech Pavlik <vojtech@suse.cz>
To: davej@codemonkey.org.uk, linux@brodo.de, pavel@suse.cz,
	linux-kernel@vger.kernel.org
Subject: PowerNow-K8 and Winchester CPUs
Date: Mon, 14 Mar 2005 17:24:26 +0100	[thread overview]
Message-ID: <20050314162426.GA2598@ucw.cz> (raw)

Hi!

I have a machine with an Athlon64 with a Winchester core. It has a max
frequency of 2GHz, vid 0x6. The maximum vid allowed is 0x4. It has an
intermediate vid 0x8. RVO is 3.

When transitioning (phase1) from vid 0x8 to vid 0x6, it first increases
the vid to 6, and then proceeds increasing it three more steps. This of
course fails, because it overflows the maximum allowed vid 0x4.

My first attempt to fix this was to limit the vid to the max vid while
doing the rvo bump-up.

However, I believe that the real reason for the problem is that the
condition to start doing the rvo bump is wrong.

This patch should fix it:

diff -Nru a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c	2005-03-14 17:20:17 +01:00
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c	2005-03-14 17:20:17 +01:00
@@ -286,7 +286,7 @@
 			return 1;
 	}
 
-	while ((rvosteps > 0)  && ((data->rvo + data->currvid) > reqvid)) {
+	while ((rvosteps > 0) && ((data->currvid - data->rvo) > reqvid)) {
 		if (data->currvid == 0) {
 			rvosteps = 0;
 		} else {

if I understand the original intent of the second test in the while()
statement. 

Any comments? Is my understanding of that bit of code correct?

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

             reply	other threads:[~2005-03-14 16:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-14 16:24 Vojtech Pavlik [this message]
2005-03-14 17:18 ` Pavel Machek
2005-03-14 17:59 Devriendt, Paul

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=20050314162426.GA2598@ucw.cz \
    --to=vojtech@suse.cz \
    --cc=davej@codemonkey.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@brodo.de \
    --cc=pavel@suse.cz \
    /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

all inboxes | Powered by JetHome®