aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/p4-clockmod.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq/p4-clockmod.c')
-rw-r--r--drivers/cpufreq/p4-clockmod.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/cpufreq/p4-clockmod.c b/drivers/cpufreq/p4-clockmod.c
index 827629c9aad7..421ef37d0bb3 100644
--- a/drivers/cpufreq/p4-clockmod.c
+++ b/drivers/cpufreq/p4-clockmod.c
@@ -58,8 +58,7 @@ static int cpufreq_p4_setdc(unsigned int cpu, unsigned int newstate)
58{ 58{
59 u32 l, h; 59 u32 l, h;
60 60
61 if (!cpu_online(cpu) || 61 if ((newstate > DC_DISABLE) || (newstate == DC_RESV))
62 (newstate > DC_DISABLE) || (newstate == DC_RESV))
63 return -EINVAL; 62 return -EINVAL;
64 63
65 rdmsr_on_cpu(cpu, MSR_IA32_THERM_STATUS, &l, &h); 64 rdmsr_on_cpu(cpu, MSR_IA32_THERM_STATUS, &l, &h);
@@ -125,10 +124,7 @@ static int cpufreq_p4_target(struct cpufreq_policy *policy,
125 return 0; 124 return 0;
126 125
127 /* notifiers */ 126 /* notifiers */
128 for_each_cpu(i, policy->cpus) { 127 cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
129 freqs.cpu = i;
130 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
131 }
132 128
133 /* run on each logical CPU, 129 /* run on each logical CPU,
134 * see section 13.15.3 of IA32 Intel Architecture Software 130 * see section 13.15.3 of IA32 Intel Architecture Software
@@ -138,10 +134,7 @@ static int cpufreq_p4_target(struct cpufreq_policy *policy,
138 cpufreq_p4_setdc(i, p4clockmod_table[newstate].index); 134 cpufreq_p4_setdc(i, p4clockmod_table[newstate].index);
139 135
140 /* notifiers */ 136 /* notifiers */
141 for_each_cpu(i, policy->cpus) { 137 cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
142 freqs.cpu = i;
143 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
144 }
145 138
146 return 0; 139 return 0;
147} 140}