Files
android_kernel_samsung_msm8…/kernel
Nicolas Pitre f2bbaf99a1 ktime: Optimize ktime_divns for constant divisors
[ Upstream commit 8b618628b2bf83512fc8df5e8672619d65adfdfb ]

At least on ARM, do_div() is optimized to turn constant divisors into
an inline multiplication by the reciprocal value at compile time.
However this optimization is missed entirely whenever ktime_divns() is
used and the slow out-of-line division code is used all the time.

Let ktime_divns() use do_div() inline whenever the divisor is constant
and small enough.  This will make things like ktime_to_us() and
ktime_to_ms() much faster.

Change-Id: I6a672b10d6d6b373b327f9548135ededfd1e1835
Cc: Arnd Bergmann <arnd.bergmann@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Nicolas Pitre <nico@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
2021-06-19 16:25:32 +02:00
..
…
…
2019-08-05 14:20:47 +02:00
2019-08-06 10:44:16 +02:00
2019-08-05 14:20:47 +02:00
…
…
…
…
…
…
…
…
…
2021-01-03 21:26:49 +01:00
…
…
2019-08-05 14:20:47 +02:00
…
…
2019-08-06 10:41:58 +02:00
2019-08-06 10:41:58 +02:00
…
…
…
2019-08-02 15:14:10 +02:00
…
…
2019-08-05 14:20:47 +02:00
…
2019-08-05 14:20:47 +02:00
…
2019-08-05 14:20:47 +02:00
2019-08-06 12:26:30 +02:00
…
…
…
…
2019-08-06 12:26:30 +02:00