lkml.org 
[lkml]   [2007]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][try 2] architectural pstate driver for powernow-k8
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-10-11 10:03    [W:0.112 / U:0.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site