Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d62141414a55ff3f1410b27db2a95224446e77a4
Commit:     d62141414a55ff3f1410b27db2a95224446e77a4
Parent:     924b42d5a2dbe508407a0a6290d3751f826bccdd
Author:     Tomas Janousek <[EMAIL PROTECTED]>
AuthorDate: Sun Jul 15 23:39:42 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon Jul 16 09:05:41 2007 -0700

    Use boot based time for uptime in /proc
    
    Commit 411187fb05cd11676b0979d9fbf3291db69dbce2 caused uptime not to 
increase
    during suspend.  This may cause confusion so I restore the old behaviour by
    using the boot based time instead of monotonic for uptime.
    
    Signed-off-by: Tomas Janousek <[EMAIL PROTECTED]>
    Acked-by: John Stultz <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/proc/proc_misc.c |    1 +
 kernel/timer.c      |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 19c9cbf..d24b8d4 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -105,6 +105,7 @@ static int uptime_read_proc(char *page, char **start, off_t 
off,
        cputime_t idletime = cputime_add(init_task.utime, init_task.stime);
 
        do_posix_clock_monotonic_gettime(&uptime);
+       monotonic_to_bootbased(&uptime);
        cputime_to_timespec(idletime, &idle);
        len = sprintf(page,"%lu.%02lu %lu.%02lu\n",
                        (unsigned long) uptime.tv_sec,
diff --git a/kernel/timer.c b/kernel/timer.c
index 1a69705..1ab3106 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1114,6 +1114,7 @@ int do_sysinfo(struct sysinfo *info)
                getnstimeofday(&tp);
                tp.tv_sec += wall_to_monotonic.tv_sec;
                tp.tv_nsec += wall_to_monotonic.tv_nsec;
+               monotonic_to_bootbased(&tp);
                if (tp.tv_nsec - NSEC_PER_SEC >= 0) {
                        tp.tv_nsec = tp.tv_nsec - NSEC_PER_SEC;
                        tp.tv_sec++;
-
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