Skip to content

Commit e71cba8

Browse files
Venkatesh Pallipadilenb
Venkatesh Pallipadi
authored andcommitted
---
yaml --- r: 143291 b: "refs/heads/rpi-3.2.27+kamal-st7735fb" c: 18b2646 h: "refs/heads/rpi-3.2.27+kamal-st7735fb" i: 143289: a9f7bfe 143287: d3c9a5a v: v3
1 parent b2ba996 commit e71cba8

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
"refs/heads/rpi-3.2.27+kamal-st7735fb": e4f6937222dbb61b8b8e62caca3d32e648b3b14b
2+
"refs/heads/rpi-3.2.27+kamal-st7735fb": 18b2646fe3babeb40b34a0c1751e0bf5adfdc64c

trunk/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ struct acpi_cpufreq_data {
6868
unsigned int max_freq;
6969
unsigned int resume;
7070
unsigned int cpu_feature;
71+
u64 saved_aperf, saved_mperf;
7172
};
7273

7374
static DEFINE_PER_CPU(struct acpi_cpufreq_data *, drv_data);
@@ -259,9 +260,6 @@ static long read_measured_perf_ctrs(void *_cur)
259260
rdmsr(MSR_IA32_APERF, cur->aperf.split.lo, cur->aperf.split.hi);
260261
rdmsr(MSR_IA32_MPERF, cur->mperf.split.lo, cur->mperf.split.hi);
261262

262-
wrmsr(MSR_IA32_APERF, 0, 0);
263-
wrmsr(MSR_IA32_MPERF, 0, 0);
264-
265263
return 0;
266264
}
267265

@@ -281,13 +279,20 @@ static long read_measured_perf_ctrs(void *_cur)
281279
static unsigned int get_measured_perf(struct cpufreq_policy *policy,
282280
unsigned int cpu)
283281
{
284-
struct perf_pair cur;
282+
struct perf_pair readin, cur;
285283
unsigned int perf_percent;
286284
unsigned int retval;
287285

288-
if (!work_on_cpu(cpu, read_measured_perf_ctrs, &cur))
286+
if (!work_on_cpu(cpu, read_measured_perf_ctrs, &readin))
289287
return 0;
290288

289+
cur.aperf.whole = readin.aperf.whole -
290+
per_cpu(drv_data, cpu)->saved_aperf;
291+
cur.mperf.whole = readin.mperf.whole -
292+
per_cpu(drv_data, cpu)->saved_mperf;
293+
per_cpu(drv_data, cpu)->saved_aperf = readin.aperf.whole;
294+
per_cpu(drv_data, cpu)->saved_mperf = readin.mperf.whole;
295+
291296
#ifdef __i386__
292297
/*
293298
* We dont want to do 64 bit divide with 32 bit kernel

0 commit comments

Comments
 (0)