linux/drivers/base/power/opp
Waldemar Rymarkiewicz 762792913f PM / OPP: Fix get sharing CPUs when hotplug is used
We fail dev_pm_opp_of_get_sharing_cpus() when possible CPU device does
not exist. This can happen on platforms where not all possible CPUs
are available at start up ie. hotplugged out.  The CPU device is not
registered in the system so we are not able to check struct device to
set the sharing CPUs bitmask properly.

Example (real use case):
2 physical MIPS cores, 4 VPE, cpu0/2 run Linux and cpu1/3 are not
available for Linux at boot up. cpufreq-dt driver + OPP v2 fail to
register opp_table due to the fact there is no struct device for
cpu1 (remains offline at
bootup).

To solve the bug, stop using device struct to check device_node.
Instead get CPU device_node directly from device tree with
of_get_cpu_node().

Signed-off-by: Waldemar Rymarkiewicz <waldemarx.rymarkiewicz@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-08-01 14:10:55 +02:00
..
Makefile PM / OPP: Move CONFIG_OF dependent code in a separate file 2016-05-06 13:22:49 +02:00
core.c PM / OPP: Add dev_pm_opp_{set|put}_clkname() 2017-06-24 01:41:55 +02:00
cpu.c PM / OPP: Move away from RCU locking 2017-01-30 09:22:22 +01:00
debugfs.c PM / OPP: Don't create debugfs "supply-0" directory unnecessarily 2017-06-22 03:15:30 +02:00
of.c PM / OPP: Fix get sharing CPUs when hotplug is used 2017-08-01 14:10:55 +02:00
opp.h PM / OPP: Move away from RCU locking 2017-01-30 09:22:22 +01:00