diff options
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c index ecdb682ab516..dd0bd76d14c0 100644 --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
@@ -68,11 +68,16 @@ struct acpi_cpufreq_data { | |||
68 | unsigned int max_freq; | 68 | unsigned int max_freq; |
69 | unsigned int resume; | 69 | unsigned int resume; |
70 | unsigned int cpu_feature; | 70 | unsigned int cpu_feature; |
71 | u64 saved_aperf, saved_mperf; | ||
72 | }; | 71 | }; |
73 | 72 | ||
74 | static DEFINE_PER_CPU(struct acpi_cpufreq_data *, drv_data); | 73 | static DEFINE_PER_CPU(struct acpi_cpufreq_data *, drv_data); |
75 | 74 | ||
75 | struct acpi_msr_data { | ||
76 | u64 saved_aperf, saved_mperf; | ||
77 | }; | ||
78 | |||
79 | static DEFINE_PER_CPU(struct acpi_msr_data, msr_data); | ||
80 | |||
76 | DEFINE_TRACE(power_mark); | 81 | DEFINE_TRACE(power_mark); |
77 | 82 | ||
78 | /* acpi_perf_data is a pointer to percpu data. */ | 83 | /* acpi_perf_data is a pointer to percpu data. */ |
@@ -287,11 +292,11 @@ static unsigned int get_measured_perf(struct cpufreq_policy *policy, | |||
287 | return 0; | 292 | return 0; |
288 | 293 | ||
289 | cur.aperf.whole = readin.aperf.whole - | 294 | cur.aperf.whole = readin.aperf.whole - |
290 | per_cpu(drv_data, cpu)->saved_aperf; | 295 | per_cpu(msr_data, cpu).saved_aperf; |
291 | cur.mperf.whole = readin.mperf.whole - | 296 | cur.mperf.whole = readin.mperf.whole - |
292 | per_cpu(drv_data, cpu)->saved_mperf; | 297 | per_cpu(msr_data, cpu).saved_mperf; |
293 | per_cpu(drv_data, cpu)->saved_aperf = readin.aperf.whole; | 298 | per_cpu(msr_data, cpu).saved_aperf = readin.aperf.whole; |
294 | per_cpu(drv_data, cpu)->saved_mperf = readin.mperf.whole; | 299 | per_cpu(msr_data, cpu).saved_mperf = readin.mperf.whole; |
295 | 300 | ||
296 | #ifdef __i386__ | 301 | #ifdef __i386__ |
297 | /* | 302 | /* |