Commit 2eeb01a2 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar
Browse files

sched/fair: Use mul_u32_u32()



While reading the code I encountered another site where we should be
using mul_u32_u32() because GCC just won't take a hint.

Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: bsegall@google.com
Cc: dietmar.eggemann@arm.com
Cc: juri.lelli@redhat.com
Cc: ktkhai@virtuozzo.com
Cc: mgorman@suse.de
Cc: qais.yousef@arm.com
Cc: qperret@google.com
Cc: rostedt@goodmis.org
Cc: valentin.schneider@arm.com
Cc: vincent.guittot@linaro.org
Link: https://lkml.kernel.org/r/20191108131909.717931380@infradead.org


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 98c2f700
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -229,8 +229,7 @@ static u64 __calc_delta(u64 delta_exec, unsigned long weight, struct load_weight
		}
		}
	}
	}


	/* hint to use a 32x32->64 mul */
	fact = mul_u32_u32(fact, lw->inv_weight);
	fact = (u64)(u32)fact * lw->inv_weight;


	while (fact >> 32) {
	while (fact >> 32) {
		fact >>= 1;
		fact >>= 1;