OpenCloudOS-Kernel/arch/x86/kernel/cpu/cpufreq
Andreas Herrmann ca446d0635 [CPUFREQ] powernow-k8: determine exact CPU frequency for HW Pstates
Slightly modified by trenn@suse.de -> only do this on fam 10h and fam 11h.

Currently powernow-k8 determines CPU frequency from ACPI PSS objects, but
according to AMD family 11h BKDG this frequency is just a rounded value:

  "CoreFreq (MHz) = The CPU COF specified by MSRC001_00[6B:64][CpuFid]
  rounded to the nearest 100 Mhz."

As a consequnce powernow-k8 reports wrong CPU frequency on some systems,
e.g. on Turion X2 Ultra:

  powernow-k8: Found 1 AMD Turion(tm)X2 Ultra DualCore Mobile ZM-82
               processors (2 cpu cores) (version 2.20.00)
  powernow-k8:    0 : pstate 0 (2200 MHz)
  powernow-k8:    1 : pstate 1 (1100 MHz)
  powernow-k8:    2 : pstate 2 (600 MHz)

But this is wrong as frequency for Pstate2 is 550 MHz. x86info reports it
correctly:

  #x86info -a |grep Pstate
  ...
  Pstate-0: fid=e, did=0, vid=24 (2200MHz)
  Pstate-1: fid=e, did=1, vid=30 (1100MHz)
  Pstate-2: fid=e, did=2, vid=3c (550MHz) (current)

Solution is to determine the frequency directly from Pstate MSRs instead
of using rounded values from ACPI table.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Dave Jones <davej@redhat.com>
2009-05-26 12:04:51 -04:00
..
Kconfig [CPUFREQ] powernow-k8: Always compile powernow-k8 driver with ACPI support 2009-02-24 22:47:31 -05:00
Makefile [CPUFREQ] Change link order of x86 cpufreq modules 2009-02-24 22:47:32 -05:00
acpi-cpufreq.c acpi-cpufreq: Do not let get_measured perf depend on internal variable 2009-04-19 22:47:21 -04:00
cpufreq-nforce2.c [CPUFREQ] Make cpufreq-nforce2 less obnoxious 2009-02-24 22:47:32 -05:00
e_powersaver.c Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2 2009-03-27 17:28:43 +01:00
elanfreq.c [CPUFREQ] checkpatch cleanups for elanfreq 2009-02-24 22:47:28 -05:00
gx-suspmod.c [CPUFREQ] checkpatch cleanups for gx-suspmod 2009-02-24 22:47:29 -05:00
longhaul.c ACPI: cpufreq: remove dupilcated #include 2009-04-07 01:39:14 -04:00
longhaul.h [CPUFREQ] checkpatch cleanups for longhaul 2009-02-24 22:47:29 -05:00
longrun.c [CPUFREQ] checkpatch cleanups for longrun 2009-02-24 22:47:29 -05:00
p4-clockmod.c [CPUFREQ] add atom family to p4-clockmod 2009-05-26 12:04:50 -04:00
powernow-k6.c [CPUFREQ] checkpatch cleanups for powernow-k6 2009-02-24 22:47:29 -05:00
powernow-k7.c [CPUFREQ] powernow-k7 build fix when ACPI=n 2009-05-26 12:04:50 -04:00
powernow-k7.h [CPUFREQ] cpufreq: remove CVS keywords 2008-05-19 18:17:49 -04:00
powernow-k8.c [CPUFREQ] powernow-k8: determine exact CPU frequency for HW Pstates 2009-05-26 12:04:51 -04:00
powernow-k8.h [CPUFREQ] powernow-k8: Always compile powernow-k8 driver with ACPI support 2009-02-24 22:47:31 -05:00
sc520_freq.c [CPUFREQ] checkpatch cleanups for sc520 2009-02-24 22:47:29 -05:00
speedstep-centrino.c x86: use symbolic constants for MSR_IA32_MISC_ENABLE bits 2009-02-20 12:07:43 +01:00
speedstep-ich.c Merge branch 'linus' into cpumask-for-linus 2009-03-30 23:53:32 +02:00
speedstep-lib.c [CPUFREQ] p4-clockmod reports wrong frequency. 2009-02-24 22:47:32 -05:00
speedstep-lib.h [CPUFREQ] checkpatch cleanups for speedstep related drivers. 2009-02-24 22:47:30 -05:00
speedstep-smi.c [CPUFREQ] checkpatch cleanups for speedstep related drivers. 2009-02-24 22:47:30 -05:00