mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
cpu-topology: Change the size of allocation for cpu's raw_capacity
Allocating raw_capacity nodes as per max possible cpus gives issues when there are cores in between which are not available. Allocate as many elements for holding raw_capacity as is last set bit position in possible mask. Change-Id: I90055f96c320b15960efac10d8d92c69413eeb6b Signed-off-by: Avaneesh Kumar Dwivedi <quic_akdwived@quicinc.com>
This commit is contained in:
parent
a845583f32
commit
ccce7f7c52
1 changed files with 1 additions and 1 deletions
|
|
@ -167,7 +167,7 @@ bool __init topology_parse_cpu_capacity(struct device_node *cpu_node, int cpu)
|
|||
&cpu_capacity);
|
||||
if (!ret) {
|
||||
if (!raw_capacity) {
|
||||
raw_capacity = kcalloc(num_possible_cpus(),
|
||||
raw_capacity = kcalloc(cpumask_last(cpu_possible_mask),
|
||||
sizeof(*raw_capacity),
|
||||
GFP_KERNEL);
|
||||
if (!raw_capacity) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue