mirror of
https://github.com/xen-project/xen.git
synced 2026-10-30 03:00:05 +01:00
x86/pmstat: restore changes lost by "consolidation"
Bothc6e0a55396("cpufreq: use existing local var in cpufreq_statistic_init()") anda1ce987411("cpufreq: don't leave stale statistics pointer") were lost in the course of "moving" the code, presumably due to overly lax re-basing. Fixes:bf0cd071db("xen/pmstat: consolidate code into pmstat.c") Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
1 parent
eb61a4fb14
commit
e98ec009cd
1 file changed
+5
-4
@@ -124,7 +124,6 @@ int cpufreq_statistic_init(unsigned int cpu)
|
||||
spin_unlock(cpufreq_statistic_lock);
|
||||
return -ENOMEM;
|
||||
}
|
||||
per_cpu(cpufreq_statistic_data, cpu) = pxpt;
|
||||
|
||||
pxpt->u.trans_pt = xzalloc_array(uint64_t, count * count);
|
||||
if ( !pxpt->u.trans_pt )
|
||||
@@ -143,15 +142,17 @@ int cpufreq_statistic_init(unsigned int cpu)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
pxpt->u.total = pmpt->perf.state_count;
|
||||
pxpt->u.usable = pmpt->perf.state_count - pmpt->perf.platform_limit;
|
||||
pxpt->u.total = count;
|
||||
pxpt->u.usable = count - pmpt->perf.platform_limit;
|
||||
|
||||
for ( i = 0; i < pmpt->perf.state_count; i++ )
|
||||
for ( i = 0; i < count; i++ )
|
||||
pxpt->u.pt[i].freq = pmpt->perf.states[i].core_frequency;
|
||||
|
||||
pxpt->prev_state_wall = NOW();
|
||||
pxpt->prev_idle_wall = get_cpu_idle_time(cpu);
|
||||
|
||||
per_cpu(cpufreq_statistic_data, cpu) = pxpt;
|
||||
|
||||
spin_unlock(cpufreq_statistic_lock);
|
||||
|
||||
return 0;
|
||||
|
||||