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

Commit 96a2e574 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched: Fix overflow in max possible capacity calculation"

parents 0ae52bda 30d383d4
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2442,10 +2442,12 @@ static int cpufreq_notifier_policy(struct notifier_block *nb,
	pre_big_small_task_count_change(cpu_possible_mask);
	for_each_cpu(i, cpus) {
		struct rq *rq = cpu_rq(i);
		u64 max_possible_capacity;

		rq->capacity = compute_capacity(i);
		rq->max_possible_capacity = rq->capacity *
				rq->max_possible_freq / rq->max_freq;
		max_possible_capacity = div_u64(((u64) rq->capacity) *
					rq->max_possible_freq, rq->max_freq);
		rq->max_possible_capacity = (int) max_possible_capacity;
		rq->load_scale_factor = compute_load_scale_factor(i);
	}