]> git.ipfire.org Git - people/ms/linux.git/commit
intel_pstate: Set CPU number before accessing MSRs
authorVincent Minet <vincent@vincent-minet.net>
Fri, 4 Jul 2014 23:51:33 +0000 (01:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jul 2014 23:23:15 +0000 (16:23 -0700)
commit1663463de7393253b520dc4351d6d89f0e123b26
tree9d04ed978563f9585b7d2f6207a003f5d055249a
parent01f4763e8fbfa42bfd8d14b5e406cb6b178eecbe
intel_pstate: Set CPU number before accessing MSRs

commit 179e8471673ce0249cd4ecda796008f7757e5bad upstream.

Ensure that cpu->cpu is set before writing MSR_IA32_PERF_CTL during CPU
initialization. Otherwise only cpu0 has its P-state set and all other
cores are left with their values unchanged.

In most cases, this is not too serious because the P-states will be set
correctly when the timer function is run.  But when the default governor
is set to performance, the per-CPU current_pstate stays the same forever
and no attempts are made to write the MSRs again.

Signed-off-by: Vincent Minet <vincent@vincent-minet.net>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/cpufreq/intel_pstate.c