PM / OPP: Fix get sharing cpus when hotplug is used
A message that is not in the archive (sent off-list or not yet received): [email protected]
Viresh Kumar
Acked-byQuoted 12 lines · Waldemar Rymarkiewicz
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. 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 registeropp_tabledue to the fact there is no struct device for cpu1 (remains offline at bootup).
Quoted 7 lines
To solve the bug, stop using device struct to check
device_node. Instead get cpudevice_nodedirectly from device tree withof_get_cpu_node().Signed-off-by Waldemar Rymarkiewicz <[email protected]>--- drivers/base/power/opp/of.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-)
Signature · 1 line
viresh
Quoted 16 lines · Viresh Kumar
Quoted 15 lines · Waldemar Rymarkiewicz
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. 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 registeropp_tabledue 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 cpudevice_nodedirectly from device tree withof_get_cpu_node().
Quoted 6 lines
Quoted 4 lines
Signed-off-by Waldemar Rymarkiewicz <[email protected]>--- drivers/base/power/opp/of.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-)Acked-by Viresh Kumar <[email protected]>
I've lost track of this, care to resend?
Quoted 17 lines · Rafael J. Wysocki
Quoted 16 lines · Viresh Kumar
Quoted 15 lines · Waldemar Rymarkiewicz
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. 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 registeropp_tabledue 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 cpudevice_nodedirectly from device tree withof_get_cpu_node().
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Signed-off-by Waldemar Rymarkiewicz <[email protected]>--- drivers/base/power/opp/of.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-)Acked-by Viresh Kumar <[email protected]>I've lost track of this, care to resend?
I've resent v3.
/Waldek
Quoted 23 lines · Waldemar Rymarkiewicz
Quoted 22 lines · Rafael J. Wysocki
Quoted 21 lines · Viresh Kumar
Quoted 19 lines · Waldemar Rymarkiewicz
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. 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 registeropp_tabledue 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 cpudevice_nodedirectly from device tree withof_get_cpu_node().Signed-off-by Waldemar Rymarkiewicz <[email protected]>--- drivers/base/power/opp/of.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-)
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Acked-by Viresh Kumar <[email protected]>I've lost track of this, care to resend?
I've resent v3.
Well, I'm not seeing it in any of my mailboxes.
Have you CCed it to the mailing lists?