Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ec03d7073971e20a866448d62c992a168201ac82
Commit:     ec03d7073971e20a866448d62c992a168201ac82
Parent:     6ffc787a4492ac627315aaeafdfdc0a5c3028582
Author:     Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Wed Feb 6 01:38:06 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Feb 6 10:41:10 2008 -0800

    speed up jiffies conversion functions if HZ==USER_HZ
    
    Avoid calling do_div(x, 1) in this case.
    
    Cc: David Fries <[EMAIL PROTECTED]>
    Cc: "H. Peter Anvin" <[EMAIL PROTECTED]>
    Cc: Ingo Molnar <[EMAIL PROTECTED]>
    Cc: Thomas Gleixner <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 kernel/time.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/kernel/time.c b/kernel/time.c
index be5c8cb..33af3e5 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
        /*
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to