Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
[linux-2.6.git] / arch / x86 / kernel / cpu / cpufreq / powernow-k8.c
index f105ffd09960887d74153885131e9f06d622a6a8..99e1ef9939bec24bc210791eecc6f23f328c24ae 100644 (file)
@@ -57,7 +57,7 @@ static struct powernow_k8_data *powernow_data[NR_CPUS];
 static int cpu_family = CPU_OPTERON;
 
 #ifndef CONFIG_SMP
-static cpumask_t cpu_core_map[1];
+DEFINE_PER_CPU(cpumask_t, cpu_core_map);
 #endif
 
 /* Return a frequency in MHz, given an input fid */
@@ -144,7 +144,7 @@ static void count_off_irt(struct powernow_k8_data *data)
        return;
 }
 
-/* the voltage stabalization time */
+/* the voltage stabilization time */
 static void count_off_vst(struct powernow_k8_data *data)
 {
        udelay(data->vstable * VST_UNITS_20US);
@@ -643,7 +643,7 @@ static int fill_powernow_table(struct powernow_k8_data *data, struct pst_s *pst,
 
        dprintk("cfid 0x%x, cvid 0x%x\n", data->currfid, data->currvid);
        data->powernow_table = powernow_table;
-       if (first_cpu(cpu_core_map[data->cpu]) == data->cpu)
+       if (first_cpu(per_cpu(cpu_core_map, data->cpu)) == data->cpu)
                print_basics(data);
 
        for (j = 0; j < data->numps; j++)
@@ -797,7 +797,7 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
 
        /* fill in data */
        data->numps = data->acpi_data.state_count;
-       if (first_cpu(cpu_core_map[data->cpu]) == data->cpu)
+       if (first_cpu(per_cpu(cpu_core_map, data->cpu)) == data->cpu)
                print_basics(data);
        powernow_k8_acpi_pst_values(data, 0);
 
@@ -1171,7 +1171,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
        if (cpu_family == CPU_HW_PSTATE)
                pol->cpus = cpumask_of_cpu(pol->cpu);
        else
-               pol->cpus = cpu_core_map[pol->cpu];
+               pol->cpus = per_cpu(cpu_core_map, pol->cpu);
        data->available_cores = &(pol->cpus);
 
        /* Take a crude guess here.
@@ -1237,7 +1237,7 @@ static unsigned int powernowk8_get (unsigned int cpu)
        cpumask_t oldmask = current->cpus_allowed;
        unsigned int khz = 0;
 
-       data = powernow_data[first_cpu(cpu_core_map[cpu])];
+       data = powernow_data[first_cpu(per_cpu(cpu_core_map, cpu))];
 
        if (!data)
                return -EINVAL;