|
@@ -1081,7 +1081,7 @@ static int powernowk8_cpu_init(struct cpufreq_policy *pol)
|
|
|
{
|
|
|
struct powernow_k8_data *data;
|
|
|
struct init_on_cpu init_on_cpu;
|
|
|
- int rc;
|
|
|
+ int rc, cpu;
|
|
|
|
|
|
smp_call_function_single(pol->cpu, check_supported_cpu, &rc, 1);
|
|
|
if (rc)
|
|
@@ -1145,7 +1145,9 @@ static int powernowk8_cpu_init(struct cpufreq_policy *pol)
|
|
|
pr_debug("cpu_init done, current fid 0x%x, vid 0x%x\n",
|
|
|
data->currfid, data->currvid);
|
|
|
|
|
|
- per_cpu(powernow_data, pol->cpu) = data;
|
|
|
+ /* Point all the CPUs in this policy to the same data */
|
|
|
+ for_each_cpu(cpu, pol->cpus)
|
|
|
+ per_cpu(powernow_data, cpu) = data;
|
|
|
|
|
|
return 0;
|
|
|
|
|
@@ -1160,6 +1162,7 @@ err_out:
|
|
|
static int powernowk8_cpu_exit(struct cpufreq_policy *pol)
|
|
|
{
|
|
|
struct powernow_k8_data *data = per_cpu(powernow_data, pol->cpu);
|
|
|
+ int cpu;
|
|
|
|
|
|
if (!data)
|
|
|
return -EINVAL;
|
|
@@ -1170,7 +1173,8 @@ static int powernowk8_cpu_exit(struct cpufreq_policy *pol)
|
|
|
|
|
|
kfree(data->powernow_table);
|
|
|
kfree(data);
|
|
|
- per_cpu(powernow_data, pol->cpu) = NULL;
|
|
|
+ for_each_cpu(cpu, pol->cpus)
|
|
|
+ per_cpu(powernow_data, cpu) = NULL;
|
|
|
|
|
|
return 0;
|
|
|
}
|