sfi-cpufreq: Temporary fix extract_freq

In my test case (MRST platform, LNW Stepping = C1),
 IA32_PERF_STATUS & INTEL_MSR_RANGE == perf->states[index].control + 1,
 except highest cpu freq.

Signed-off-by: Major Lee <[email protected]>
---
--- linux-2.6.37.bak/arch/x86/kernel/cpu/cpufreq/sfi-cpufreq.c
2011-03-17 11:17:13.690941011 +0800
+++ linux-2.6.37/arch/x86/kernel/cpu/cpufreq/sfi-cpufreq.c 2011-03-23
15:57:26.140625000 +0800
@@ -249,6 +249,7 @@ static int check_est_cpu(unsigned int cp
  return 1;
 }
 
+#define BUS_RATIO_STS (0x1F << 8)
 static unsigned extract_freq(u32 msr, struct sfi_cpufreq_data *data)
 {
  int i;
@@ -258,7 +259,7 @@ static unsigned extract_freq(u32 msr, st
  perf = data->sfi_data;
 
  for (i = 0; data->freq_table[i].frequency != CPUFREQ_TABLE_END; i++) {
-  if (msr == perf->states[data->freq_table[i].index].control)
+  if ((msr & BUS_RATIO_STS) ==
(perf->states[data->freq_table[i].index].control & BUS_RATIO_STS))
    return data->freq_table[i].frequency;
  }
  return data->freq_table[0].frequency;


_______________________________________________
MeeGo-kernel mailing list
[email protected]
http://lists.meego.com/listinfo/meego-kernel

Reply via email to