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

Commit ec03d707 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds
Browse files

speed up jiffies conversion functions if HZ==USER_HZ



Avoid calling do_div(x, 1) in this case.

Cc: David Fries <david@fries.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6ffc787a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -606,8 +606,10 @@ u64 jiffies_64_to_clock_t(u64 x)
# if HZ < USER_HZ
	x *= USER_HZ;
	do_div(x, HZ);
# else
# elif HZ > USER_HZ
	do_div(x, HZ / USER_HZ);
# else
	/* Nothing to do */
# endif
#else
	/*