From: Andrew Morton Date: Wed, 6 Feb 2008 09:38:06 +0000 (-0800) Subject: speed up jiffies conversion functions if HZ==USER_HZ X-Git-Tag: v2.6.25-rc1~664 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=ec03d7073971e20a866448d62c992a168201ac82;p=linux-2.6-omap-h63xx.git speed up jiffies conversion functions if HZ==USER_HZ Avoid calling do_div(x, 1) in this case. Cc: David Fries Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/time.c b/kernel/time.c index be5c8cb9358..33af3e55570 100644 --- a/kernel/time.c +++ b/kernel/time.c @@ -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 /*