public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@shadowen.org>
To: Mark Langsdorf <mark.langsdorf@amd.com>
Cc: Andi Kleen <andi@firstfloor.org>,
	cpufreq@lists.linux.org.uk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][try 2] architectural pstate driver for powernow-k8
Date: Thu, 11 Oct 2007 08:59:58 +0100	[thread overview]
Message-ID: <20071011075958.GK1130@shadowen.org> (raw)
In-Reply-To: <200710091543.21350.mark.langsdorf@amd.com>

On Tue, Oct 09, 2007 at 03:43:20PM -0500, Mark Langsdorf wrote:
> On Tuesday 09 October 2007 15:06, Andi Kleen wrote:
> > "Mark Langsdorf" <mark.langsdorf@amd.com> writes:
> > 
> > > This patch should apply cleanly to the 2.6.22.6 kernel.
> > 
> > Isn't that a little old? The earliest this could be merged
> > is the upcomming 2.6.24 tree. Best you submit it against .23
> > or better -mm.
> 
> Good point.
> 
> This patch should apply cleanly to the 2.6.23-rc8-mm2 kernel.  It changes 
> the powernow-k8 driver code that deals with 3rd generation Opteron, Phenom,
> and later processors to match the architectual pstate driver described
> in the AMD64 Architecture Programmer's Manual Volume 2 Chapter 18.  The
> initial implementation of the hardware pstate driver for PowerNow!
> used some processor-version specific features, and would not be
> maintainable in the long term as the processor features changed.
> This architectural driver should work on all future AMD processors.
> 
> -Mark Langsdorf
> Operating System Resarch Center
> AMD
> 
> Signed-off-by <mark.langsdorf@amd.com>
> Acked-by <andreas.herrmann3@amd.com>
[...]
>  	/* get fid did for hardware pstate transition */
>  	pstate = index & HW_PSTATE_MASK;
> -	if (pstate > MAX_HW_PSTATE)
> +	if (pstate > data->max_hw_pstate);
>  		return 0;

checkpatch picked up this dodgy if.  I suspect that the ';' is wrong
from the context.

> -	fid = (index & HW_FID_INDEX_MASK) >> HW_FID_INDEX_SHIFT;
> -	did = (index & HW_DID_INDEX_MASK) >> HW_DID_INDEX_SHIFT;
> -	freqs.old = find_khz_freq_from_fiddid(data->currfid, data->currdid);
> -	freqs.new = find_khz_freq_from_fiddid(fid, did);
> +	freqs.old = find_khz_freq_from_pstate(data->powernow_table, data->currpstate);
> +	freqs.new = find_khz_freq_from_pstate(data->powernow_table, pstate);

-apw

  parent reply	other threads:[~2007-10-11  8:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-09 19:46 [PATCH] architectural pstate driver for powernow-k8 Mark Langsdorf
2007-10-09 20:06 ` Andi Kleen
2007-10-09 20:43   ` [PATCH][try 2] " Mark Langsdorf
2007-10-09 23:41     ` Dave Jones
2007-10-10 16:35       ` Andreas Herrmann3
2007-10-10 17:06         ` Langsdorf, Mark
2007-10-11  7:59     ` Andy Whitcroft [this message]
2007-10-15 15:40       ` Dave Jones
2007-10-15 16:23         ` [PATCH][try 3] " Mark Langsdorf
2007-10-15 20:32           ` Dave Jones
2007-10-15 21:03           ` [PATCH][try 4] " Mark Langsdorf
2007-10-17 21:33             ` Dave Jones

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=20071011075958.GK1130@shadowen.org \
    --to=apw@shadowen.org \
    --cc=andi@firstfloor.org \
    --cc=cpufreq@lists.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.langsdorf@amd.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