aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/cpufreq
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/cpu/cpufreq')
-rw-r--r--arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c2
-rw-r--r--arch/x86/kernel/cpu/cpufreq/powernow-k8.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
index ffd01e5dcb52..2ca43ba32bc0 100644
--- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -595,7 +595,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
595 dmi_check_system(sw_any_bug_dmi_table); 595 dmi_check_system(sw_any_bug_dmi_table);
596 if (bios_with_sw_any_bug && cpus_weight(policy->cpus) == 1) { 596 if (bios_with_sw_any_bug && cpus_weight(policy->cpus) == 1) {
597 policy->shared_type = CPUFREQ_SHARED_TYPE_ALL; 597 policy->shared_type = CPUFREQ_SHARED_TYPE_ALL;
598 policy->cpus = cpu_core_map[cpu]; 598 policy->cpus = per_cpu(cpu_core_map, cpu);
599 } 599 }
600#endif 600#endif
601 601
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
index b273b69cfddf..c06ac680c9ca 100644
--- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
@@ -57,7 +57,7 @@ static struct powernow_k8_data *powernow_data[NR_CPUS];
57static int cpu_family = CPU_OPTERON; 57static int cpu_family = CPU_OPTERON;
58 58
59#ifndef CONFIG_SMP 59#ifndef CONFIG_SMP
60static cpumask_t cpu_core_map[1]; 60DEFINE_PER_CPU(cpumask_t, cpu_core_map);
61#endif 61#endif
62 62
63/* Return a frequency in MHz, given an input fid */ 63/* Return a frequency in MHz, given an input fid */
@@ -667,7 +667,7 @@ static int fill_powernow_table(struct powernow_k8_data *data, struct pst_s *pst,
667 667
668 dprintk("cfid 0x%x, cvid 0x%x\n", data->currfid, data->currvid); 668 dprintk("cfid 0x%x, cvid 0x%x\n", data->currfid, data->currvid);
669 data->powernow_table = powernow_table; 669 data->powernow_table = powernow_table;
670 if (first_cpu(cpu_core_map[data->cpu]) == data->cpu) 670 if (first_cpu(per_cpu(cpu_core_map, data->cpu)) == data->cpu)
671 print_basics(data); 671 print_basics(data);
672 672
673 for (j = 0; j < data->numps; j++) 673 for (j = 0; j < data->numps; j++)
@@ -821,7 +821,7 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
821 821
822 /* fill in data */ 822 /* fill in data */
823 data->numps = data->acpi_data.state_count; 823 data->numps = data->acpi_data.state_count;
824 if (first_cpu(cpu_core_map[data->cpu]) == data->cpu) 824 if (first_cpu(per_cpu(cpu_core_map, data->cpu)) == data->cpu)
825 print_basics(data); 825 print_basics(data);
826 powernow_k8_acpi_pst_values(data, 0); 826 powernow_k8_acpi_pst_values(data, 0);
827 827
@@ -1214,7 +1214,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
1214 if (cpu_family == CPU_HW_PSTATE) 1214 if (cpu_family == CPU_HW_PSTATE)
1215 pol->cpus = cpumask_of_cpu(pol->cpu); 1215 pol->cpus = cpumask_of_cpu(pol->cpu);
1216 else 1216 else
1217 pol->cpus = cpu_core_map[pol->cpu]; 1217 pol->cpus = per_cpu(cpu_core_map, pol->cpu);
1218 data->available_cores = &(pol->cpus); 1218 data->available_cores = &(pol->cpus);
1219 1219
1220 /* Take a crude guess here. 1220 /* Take a crude guess here.
@@ -1281,7 +1281,7 @@ static unsigned int powernowk8_get (unsigned int cpu)
1281 cpumask_t oldmask = current->cpus_allowed; 1281 cpumask_t oldmask = current->cpus_allowed;
1282 unsigned int khz = 0; 1282 unsigned int khz = 0;
1283 1283
1284 data = powernow_data[first_cpu(cpu_core_map[cpu])]; 1284 data = powernow_data[first_cpu(per_cpu(cpu_core_map, cpu))];
1285 1285
1286 if (!data) 1286 if (!data)
1287 return -EINVAL; 1287 return -EINVAL;