diff options
Diffstat (limited to 'arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c')
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c index 7d5c3b0ea8da..43eb3465dda7 100644 --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
@@ -68,9 +68,9 @@ struct acpi_cpufreq_data { | |||
68 | unsigned int cpu_feature; | 68 | unsigned int cpu_feature; |
69 | }; | 69 | }; |
70 | 70 | ||
71 | static DEFINE_PER_CPU(struct acpi_cpufreq_data *, drv_data); | 71 | static DEFINE_PER_CPU(struct acpi_cpufreq_data *, acfreq_data); |
72 | 72 | ||
73 | static DEFINE_PER_CPU(struct aperfmperf, old_perf); | 73 | static DEFINE_PER_CPU(struct aperfmperf, acfreq_old_perf); |
74 | 74 | ||
75 | /* acpi_perf_data is a pointer to percpu data. */ | 75 | /* acpi_perf_data is a pointer to percpu data. */ |
76 | static struct acpi_processor_performance *acpi_perf_data; | 76 | static struct acpi_processor_performance *acpi_perf_data; |
@@ -214,14 +214,14 @@ static u32 get_cur_val(const struct cpumask *mask) | |||
214 | if (unlikely(cpumask_empty(mask))) | 214 | if (unlikely(cpumask_empty(mask))) |
215 | return 0; | 215 | return 0; |
216 | 216 | ||
217 | switch (per_cpu(drv_data, cpumask_first(mask))->cpu_feature) { | 217 | switch (per_cpu(acfreq_data, cpumask_first(mask))->cpu_feature) { |
218 | case SYSTEM_INTEL_MSR_CAPABLE: | 218 | case SYSTEM_INTEL_MSR_CAPABLE: |
219 | cmd.type = SYSTEM_INTEL_MSR_CAPABLE; | 219 | cmd.type = SYSTEM_INTEL_MSR_CAPABLE; |
220 | cmd.addr.msr.reg = MSR_IA32_PERF_STATUS; | 220 | cmd.addr.msr.reg = MSR_IA32_PERF_STATUS; |
221 | break; | 221 | break; |
222 | case SYSTEM_IO_CAPABLE: | 222 | case SYSTEM_IO_CAPABLE: |
223 | cmd.type = SYSTEM_IO_CAPABLE; | 223 | cmd.type = SYSTEM_IO_CAPABLE; |
224 | perf = per_cpu(drv_data, cpumask_first(mask))->acpi_data; | 224 | perf = per_cpu(acfreq_data, cpumask_first(mask))->acpi_data; |
225 | cmd.addr.io.port = perf->control_register.address; | 225 | cmd.addr.io.port = perf->control_register.address; |
226 | cmd.addr.io.bit_width = perf->control_register.bit_width; | 226 | cmd.addr.io.bit_width = perf->control_register.bit_width; |
227 | break; | 227 | break; |
@@ -268,8 +268,8 @@ static unsigned int get_measured_perf(struct cpufreq_policy *policy, | |||
268 | if (smp_call_function_single(cpu, read_measured_perf_ctrs, &perf, 1)) | 268 | if (smp_call_function_single(cpu, read_measured_perf_ctrs, &perf, 1)) |
269 | return 0; | 269 | return 0; |
270 | 270 | ||
271 | ratio = calc_aperfmperf_ratio(&per_cpu(old_perf, cpu), &perf); | 271 | ratio = calc_aperfmperf_ratio(&per_cpu(acfreq_old_perf, cpu), &perf); |
272 | per_cpu(old_perf, cpu) = perf; | 272 | per_cpu(acfreq_old_perf, cpu) = perf; |
273 | 273 | ||
274 | retval = (policy->cpuinfo.max_freq * ratio) >> APERFMPERF_SHIFT; | 274 | retval = (policy->cpuinfo.max_freq * ratio) >> APERFMPERF_SHIFT; |
275 | 275 | ||
@@ -278,7 +278,7 @@ static unsigned int get_measured_perf(struct cpufreq_policy *policy, | |||
278 | 278 | ||
279 | static unsigned int get_cur_freq_on_cpu(unsigned int cpu) | 279 | static unsigned int get_cur_freq_on_cpu(unsigned int cpu) |
280 | { | 280 | { |
281 | struct acpi_cpufreq_data *data = per_cpu(drv_data, cpu); | 281 | struct acpi_cpufreq_data *data = per_cpu(acfreq_data, cpu); |
282 | unsigned int freq; | 282 | unsigned int freq; |
283 | unsigned int cached_freq; | 283 | unsigned int cached_freq; |
284 | 284 | ||
@@ -322,7 +322,7 @@ static unsigned int check_freqs(const struct cpumask *mask, unsigned int freq, | |||
322 | static int acpi_cpufreq_target(struct cpufreq_policy *policy, | 322 | static int acpi_cpufreq_target(struct cpufreq_policy *policy, |
323 | unsigned int target_freq, unsigned int relation) | 323 | unsigned int target_freq, unsigned int relation) |
324 | { | 324 | { |
325 | struct acpi_cpufreq_data *data = per_cpu(drv_data, policy->cpu); | 325 | struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu); |
326 | struct acpi_processor_performance *perf; | 326 | struct acpi_processor_performance *perf; |
327 | struct cpufreq_freqs freqs; | 327 | struct cpufreq_freqs freqs; |
328 | struct drv_cmd cmd; | 328 | struct drv_cmd cmd; |
@@ -416,7 +416,7 @@ out: | |||
416 | 416 | ||
417 | static int acpi_cpufreq_verify(struct cpufreq_policy *policy) | 417 | static int acpi_cpufreq_verify(struct cpufreq_policy *policy) |
418 | { | 418 | { |
419 | struct acpi_cpufreq_data *data = per_cpu(drv_data, policy->cpu); | 419 | struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu); |
420 | 420 | ||
421 | dprintk("acpi_cpufreq_verify\n"); | 421 | dprintk("acpi_cpufreq_verify\n"); |
422 | 422 | ||
@@ -563,7 +563,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
563 | return -ENOMEM; | 563 | return -ENOMEM; |
564 | 564 | ||
565 | data->acpi_data = per_cpu_ptr(acpi_perf_data, cpu); | 565 | data->acpi_data = per_cpu_ptr(acpi_perf_data, cpu); |
566 | per_cpu(drv_data, cpu) = data; | 566 | per_cpu(acfreq_data, cpu) = data; |
567 | 567 | ||
568 | if (cpu_has(c, X86_FEATURE_CONSTANT_TSC)) | 568 | if (cpu_has(c, X86_FEATURE_CONSTANT_TSC)) |
569 | acpi_cpufreq_driver.flags |= CPUFREQ_CONST_LOOPS; | 569 | acpi_cpufreq_driver.flags |= CPUFREQ_CONST_LOOPS; |
@@ -714,20 +714,20 @@ err_unreg: | |||
714 | acpi_processor_unregister_performance(perf, cpu); | 714 | acpi_processor_unregister_performance(perf, cpu); |
715 | err_free: | 715 | err_free: |
716 | kfree(data); | 716 | kfree(data); |
717 | per_cpu(drv_data, cpu) = NULL; | 717 | per_cpu(acfreq_data, cpu) = NULL; |
718 | 718 | ||
719 | return result; | 719 | return result; |
720 | } | 720 | } |
721 | 721 | ||
722 | static int acpi_cpufreq_cpu_exit(struct cpufreq_policy *policy) | 722 | static int acpi_cpufreq_cpu_exit(struct cpufreq_policy *policy) |
723 | { | 723 | { |
724 | struct acpi_cpufreq_data *data = per_cpu(drv_data, policy->cpu); | 724 | struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu); |
725 | 725 | ||
726 | dprintk("acpi_cpufreq_cpu_exit\n"); | 726 | dprintk("acpi_cpufreq_cpu_exit\n"); |
727 | 727 | ||
728 | if (data) { | 728 | if (data) { |
729 | cpufreq_frequency_table_put_attr(policy->cpu); | 729 | cpufreq_frequency_table_put_attr(policy->cpu); |
730 | per_cpu(drv_data, policy->cpu) = NULL; | 730 | per_cpu(acfreq_data, policy->cpu) = NULL; |
731 | acpi_processor_unregister_performance(data->acpi_data, | 731 | acpi_processor_unregister_performance(data->acpi_data, |
732 | policy->cpu); | 732 | policy->cpu); |
733 | kfree(data); | 733 | kfree(data); |
@@ -738,7 +738,7 @@ static int acpi_cpufreq_cpu_exit(struct cpufreq_policy *policy) | |||
738 | 738 | ||
739 | static int acpi_cpufreq_resume(struct cpufreq_policy *policy) | 739 | static int acpi_cpufreq_resume(struct cpufreq_policy *policy) |
740 | { | 740 | { |
741 | struct acpi_cpufreq_data *data = per_cpu(drv_data, policy->cpu); | 741 | struct acpi_cpufreq_data *data = per_cpu(acfreq_data, policy->cpu); |
742 | 742 | ||
743 | dprintk("acpi_cpufreq_resume\n"); | 743 | dprintk("acpi_cpufreq_resume\n"); |
744 | 744 | ||