aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/powernow-k7.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq/powernow-k7.c')
-rw-r--r--drivers/cpufreq/powernow-k7.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/cpufreq/powernow-k7.c b/drivers/cpufreq/powernow-k7.c
index 334cc2f1e9f1..53888dacbe58 100644
--- a/drivers/cpufreq/powernow-k7.c
+++ b/drivers/cpufreq/powernow-k7.c
@@ -248,7 +248,7 @@ static void change_VID(int vid)
248} 248}
249 249
250 250
251static void change_speed(unsigned int index) 251static void change_speed(struct cpufreq_policy *policy, unsigned int index)
252{ 252{
253 u8 fid, vid; 253 u8 fid, vid;
254 struct cpufreq_freqs freqs; 254 struct cpufreq_freqs freqs;
@@ -263,15 +263,13 @@ static void change_speed(unsigned int index)
263 fid = powernow_table[index].index & 0xFF; 263 fid = powernow_table[index].index & 0xFF;
264 vid = (powernow_table[index].index & 0xFF00) >> 8; 264 vid = (powernow_table[index].index & 0xFF00) >> 8;
265 265
266 freqs.cpu = 0;
267
268 rdmsrl(MSR_K7_FID_VID_STATUS, fidvidstatus.val); 266 rdmsrl(MSR_K7_FID_VID_STATUS, fidvidstatus.val);
269 cfid = fidvidstatus.bits.CFID; 267 cfid = fidvidstatus.bits.CFID;
270 freqs.old = fsb * fid_codes[cfid] / 10; 268 freqs.old = fsb * fid_codes[cfid] / 10;
271 269
272 freqs.new = powernow_table[index].frequency; 270 freqs.new = powernow_table[index].frequency;
273 271
274 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); 272 cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
275 273
276 /* Now do the magic poking into the MSRs. */ 274 /* Now do the magic poking into the MSRs. */
277 275
@@ -292,7 +290,7 @@ static void change_speed(unsigned int index)
292 if (have_a0 == 1) 290 if (have_a0 == 1)
293 local_irq_enable(); 291 local_irq_enable();
294 292
295 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 293 cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
296} 294}
297 295
298 296
@@ -546,7 +544,7 @@ static int powernow_target(struct cpufreq_policy *policy,
546 relation, &newstate)) 544 relation, &newstate))
547 return -EINVAL; 545 return -EINVAL;
548 546
549 change_speed(newstate); 547 change_speed(policy, newstate);
550 548
551 return 0; 549 return 0;
552} 550}