aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorAndreas Herrmann <andreas.herrmann3@amd.com>2012-01-06 09:56:31 -0500
committerDave Jones <davej@redhat.com>2012-01-06 10:10:53 -0500
commit201bf0f129e1715a33568d1563d9a75b840ab4d3 (patch)
tree19169945533ef7dbe0c562f43c451a08903b4fdd /drivers/cpufreq
parentd08de0c19c3fc5b9cf557ce3b42795d036ad5da9 (diff)
[CPUFREQ] powernow-k8: Avoid Pstate MSR accesses on systems supporting CPB
Due to CPB we can't directly map SW Pstates to Pstate MSRs. Get rid of the paranoia check. (assuming that the ACPI Pstate information is correct.) Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com> Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/powernow-k8.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c
index bce576d7478e..e0329f9fa40e 100644
--- a/drivers/cpufreq/powernow-k8.c
+++ b/drivers/cpufreq/powernow-k8.c
@@ -926,23 +926,24 @@ static int fill_powernow_table_pstate(struct powernow_k8_data *data,
926 invalidate_entry(powernow_table, i); 926 invalidate_entry(powernow_table, i);
927 continue; 927 continue;
928 } 928 }
929 rdmsr(MSR_PSTATE_DEF_BASE + index, lo, hi);
930 if (!(hi & HW_PSTATE_VALID_MASK)) {
931 pr_debug("invalid pstate %d, ignoring\n", index);
932 invalidate_entry(powernow_table, i);
933 continue;
934 }
935
936 powernow_table[i].index = index;
937
938 /* Frequency may be rounded for these */ 929 /* Frequency may be rounded for these */
939 if ((boot_cpu_data.x86 == 0x10 && boot_cpu_data.x86_model < 10) 930 if ((boot_cpu_data.x86 == 0x10 && boot_cpu_data.x86_model < 10)
940 || boot_cpu_data.x86 == 0x11) { 931 || boot_cpu_data.x86 == 0x11) {
932
933 rdmsr(MSR_PSTATE_DEF_BASE + index, lo, hi);
934 if (!(hi & HW_PSTATE_VALID_MASK)) {
935 pr_debug("invalid pstate %d, ignoring\n", index);
936 invalidate_entry(powernow_table, i);
937 continue;
938 }
939
941 powernow_table[i].frequency = 940 powernow_table[i].frequency =
942 freq_from_fid_did(lo & 0x3f, (lo >> 6) & 7); 941 freq_from_fid_did(lo & 0x3f, (lo >> 6) & 7);
943 } else 942 } else
944 powernow_table[i].frequency = 943 powernow_table[i].frequency =
945 data->acpi_data.states[i].core_frequency * 1000; 944 data->acpi_data.states[i].core_frequency * 1000;
945
946 powernow_table[i].index = index;
946 } 947 }
947 return 0; 948 return 0;
948} 949}