]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: powernv: Define per_cpu chip pointer to optimize hot-path
authorMichael Neuling <mikey@neuling.org>
Mon, 21 Mar 2016 16:54:52 +0000 (22:24 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 22 Mar 2016 00:08:55 +0000 (01:08 +0100)
commit0ef979eccb9355e26af5938120599a2a985944c4
tree216fb97bcf417def706207afe7e44f77fb6d8c53
parent71e5c4dafc6c38824bdebdee749c9573157f24dc
cpufreq: powernv: Define per_cpu chip pointer to optimize hot-path

Commit d3a0ad34c56a "cpufreq: powernv: Remove cpu_to_chip_id() from
hot-path" introduced a 'core_to_chip_map' array to cache the chip-ids
of all cores.

Replace this with a per-CPU variable that stores the pointer to the
chip-array. This removes the linear lookup and provides a neater and
simpler solution.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Shilpasri G Bhat <shilpa.bhat@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