]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
cpufreq: powernv: Use PMCR to verify global and local pstate
authorAkshay Adiga <akshay.adiga@linux.vnet.ibm.com>
Tue, 8 Nov 2016 13:33:28 +0000 (19:03 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 11 Nov 2016 00:41:02 +0000 (01:41 +0100)
commit20b15b7663549b34abcb4a18f16fedb239406c41
tree1b1b4e306b28e582110b7481e53cd06feaa5103e
parent60c9efb8f783194200bdb510df8d9d4fb398016e
cpufreq: powernv: Use PMCR to verify global and local pstate

As fast_switch() may get called with interrupt disable mode, we cannot
hold a mutex to update the global_pstate_info. So currently, fast_switch()
does not update the global_pstate_info and it will end up with stale data
whenever pstate is updated through fast_switch().

As the gpstate_timer can fire after fast_switch() has updated the pstates,
the timer handler cannot rely on the cached values of local and global
pstate and needs to read it from the PMCR.

Only gpstate_timer_handler() is affected by the stale cached pstate data
beacause either fast_switch() or target_index() routines will be called
for a given govenor, but gpstate_timer can fire after the governor has
changed to schedutil.

Signed-off-by: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>
Reviewed-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/powernv-cpufreq.c