[PATCH] Revert "sched/cputime: Fix mul_u64_u64_div_u64() precision for cputime"

From: Nicolas Pitre
Date: Fri Oct 04 2024 - 20:20:16 EST


This reverts commit 77baa5bafcbe1b2a15ef9c37232c21279c95481c.

After commit b29a62d87cc0 ("mul_u64_u64_div_u64: make it precise always")
it is no longer necessary to have this workaround.

Signed-off-by: Nicolas Pitre <npitre@xxxxxxxxxxxx>
---
kernel/sched/cputime.c | 6 ------
1 file changed, 6 deletions(-)

diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
index 0bed0fa1ac..a5e00293ae 100644
--- a/kernel/sched/cputime.c
+++ b/kernel/sched/cputime.c
@@ -582,12 +582,6 @@ void cputime_adjust(struct task_cputime *curr, struct prev_cputime *prev,
}

stime = mul_u64_u64_div_u64(stime, rtime, stime + utime);
- /*
- * Because mul_u64_u64_div_u64() can approximate on some
- * achitectures; enforce the constraint that: a*b/(b+c) <= a.
- */
- if (unlikely(stime > rtime))
- stime = rtime;

update:
/*
--
2.46.1