Commit f6f4ffa6 authored by Dave Jones's avatar Dave Jones

Merge delerium.codemonkey.org.uk:/mnt/nfs/sepia/bar/src/kernel/2.6/trees/bk-linus

into delerium.codemonkey.org.uk:/mnt/nfs/sepia/bar/src/kernel/2.6/trees/cpufreq
parents a3d93eb3 1040d42e
...@@ -170,6 +170,9 @@ static void longhaul_setstate (unsigned int clock_ratio_index) ...@@ -170,6 +170,9 @@ static void longhaul_setstate (unsigned int clock_ratio_index)
* between that value multiplied by possible FSBs and cpu_mhz which * between that value multiplied by possible FSBs and cpu_mhz which
* was calculated at boot time. Really ugly, but no other way to do this. * was calculated at boot time. Really ugly, but no other way to do this.
*/ */
#define ROUNDING 0xf
static int _guess (int guess, int maxmult) static int _guess (int guess, int maxmult)
{ {
int target; int target;
...@@ -177,16 +180,20 @@ static int _guess (int guess, int maxmult) ...@@ -177,16 +180,20 @@ static int _guess (int guess, int maxmult)
target = ((maxmult/10)*guess); target = ((maxmult/10)*guess);
if (maxmult%10 != 0) if (maxmult%10 != 0)
target += (guess/2); target += (guess/2);
target &= ~0xf; target += ROUNDING/2;
target &= ~ROUNDING;
return target; return target;
} }
static int guess_fsb(int maxmult) static int guess_fsb(int maxmult)
{ {
int speed = (cpu_khz/1000) & ~0xf; int speed = (cpu_khz/1000);
int i; int i;
int speeds[3] = { 66, 100, 133 }; int speeds[3] = { 66, 100, 133 };
speed += ROUNDING/2;
speed &= ~ROUNDING;
for (i=0; i<3; i++) { for (i=0; i<3; i++) {
if (_guess(speeds[i],maxmult) == speed) if (_guess(speeds[i],maxmult) == speed)
return speeds[i]; return speeds[i];
......
...@@ -337,7 +337,8 @@ static int powernow_decode_bios (int maxfid, int startvid) ...@@ -337,7 +337,8 @@ static int powernow_decode_bios (int maxfid, int startvid)
} }
} }
printk (KERN_INFO PFX "No PST tables match this cpuid (0x%x)\n", etuple); printk (KERN_INFO PFX "No PST tables match this cpuid (0x%x)\n", etuple);
printk ("This is indicative of a broken BIOS. Email davej@redhat.com\n"); printk (KERN_INFO PFX "This is indicative of a broken BIOS.\n");
printk (KERN_INFO PFX "See http://www.codemonkey.org.uk/projects/cpufreq/powernow-k7.shtml\n");
return -EINVAL; return -EINVAL;
} }
p++; p++;
......
...@@ -935,10 +935,7 @@ powernowk8_verify(struct cpufreq_policy *pol) ...@@ -935,10 +935,7 @@ powernowk8_verify(struct cpufreq_policy *pol)
return -ENODEV; return -ENODEV;
} }
#warning pol->policy is in undefined state here res = find_match(&targ, &min, &max, SEARCH_DOWN, 0, 0);
res = find_match(&targ, &min, &max,
pol->policy == CPUFREQ_POLICY_POWERSAVE ?
SEARCH_DOWN : SEARCH_UP, 0, 0);
if (!res) { if (!res) {
pol->min = min * 1000; pol->min = min * 1000;
pol->max = max * 1000; pol->max = max * 1000;
......
...@@ -73,6 +73,16 @@ static struct cpufreq_frequency_table op_900[] = ...@@ -73,6 +73,16 @@ static struct cpufreq_frequency_table op_900[] =
{ .frequency = CPUFREQ_TABLE_END } { .frequency = CPUFREQ_TABLE_END }
}; };
/* Ultra Low Voltage Intel Pentium M processor 1000MHz */
static struct cpufreq_frequency_table op_1000[] =
{
OP(600, 844),
OP(800, 972),
OP(900, 988),
OP(1000, 1004),
{ .frequency = CPUFREQ_TABLE_END }
};
/* Low Voltage Intel Pentium M processor 1.10GHz */ /* Low Voltage Intel Pentium M processor 1.10GHz */
static struct cpufreq_frequency_table op_1100[] = static struct cpufreq_frequency_table op_1100[] =
{ {
...@@ -165,6 +175,7 @@ static struct cpufreq_frequency_table op_1700[] = ...@@ -165,6 +175,7 @@ static struct cpufreq_frequency_table op_1700[] =
static const struct cpu_model models[] = static const struct cpu_model models[] =
{ {
_CPU( 900, " 900"), _CPU( 900, " 900"),
CPU(1000),
CPU(1100), CPU(1100),
CPU(1200), CPU(1200),
CPU(1300), CPU(1300),
......
...@@ -225,9 +225,10 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy) ...@@ -225,9 +225,10 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)
return -ENODEV; return -ENODEV;
result = speedstep_smi_ownership(); result = speedstep_smi_ownership();
if (result) {
if (result)
dprintk(KERN_INFO "cpufreq: fails an aquiring ownership of a SMI interface.\n"); dprintk(KERN_INFO "cpufreq: fails an aquiring ownership of a SMI interface.\n");
return -EINVAL;
}
/* detect low and high frequency */ /* detect low and high frequency */
result = speedstep_smi_get_freqs(&speedstep_freqs[SPEEDSTEP_LOW].frequency, result = speedstep_smi_get_freqs(&speedstep_freqs[SPEEDSTEP_LOW].frequency,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment