[tip: sched/core] sched/fair: Use mul_u32_u32()

From: tip-bot2 for Peter Zijlstra
Date: Mon Nov 11 2019 - 04:33:13 EST


The following commit has been merged into the sched/core branch of tip:

Commit-ID: 2eeb01a28c9233333bf229a5b4b0559f4bd22b52
Gitweb: https://git.kernel.org/tip/2eeb01a28c9233333bf229a5b4b0559f4bd22b52
Author: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
AuthorDate: Fri, 08 Nov 2019 14:15:59 +01:00
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitterDate: Mon, 11 Nov 2019 08:35:20 +01:00

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: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: bsegall@xxxxxxxxxx
Cc: dietmar.eggemann@xxxxxxx
Cc: juri.lelli@xxxxxxxxxx
Cc: ktkhai@xxxxxxxxxxxxx
Cc: mgorman@xxxxxxx
Cc: qais.yousef@xxxxxxx
Cc: qperret@xxxxxxxxxx
Cc: rostedt@xxxxxxxxxxx
Cc: valentin.schneider@xxxxxxx
Cc: vincent.guittot@xxxxxxxxxx
Link: https://lkml.kernel.org/r/20191108131909.717931380@xxxxxxxxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
kernel/sched/fair.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 1789193..ba97d1a 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -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 = (u64)(u32)fact * lw->inv_weight;
+ fact = mul_u32_u32(fact, lw->inv_weight);

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