Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ccce7f7c authored by Avaneesh Kumar Dwivedi's avatar Avaneesh Kumar Dwivedi Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarAvaneesh Kumar Dwivedi <quic_akdwived@quicinc.com>
parent a845583f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {