diff options
Diffstat (limited to 'fs/proc/proc_misc.c')
-rw-r--r-- | fs/proc/proc_misc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index 5fd49e47f83a..d24b8d46059a 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, | |||
105 | cputime_t idletime = cputime_add(init_task.utime, init_task.stime); | 105 | cputime_t idletime = cputime_add(init_task.utime, init_task.stime); |
106 | 106 | ||
107 | do_posix_clock_monotonic_gettime(&uptime); | 107 | do_posix_clock_monotonic_gettime(&uptime); |
108 | monotonic_to_bootbased(&uptime); | ||
108 | cputime_to_timespec(idletime, &idle); | 109 | cputime_to_timespec(idletime, &idle); |
109 | len = sprintf(page,"%lu.%02lu %lu.%02lu\n", | 110 | len = sprintf(page,"%lu.%02lu %lu.%02lu\n", |
110 | (unsigned long) uptime.tv_sec, | 111 | (unsigned long) uptime.tv_sec, |
@@ -443,12 +444,12 @@ static int show_stat(struct seq_file *p, void *v) | |||
443 | unsigned long jif; | 444 | unsigned long jif; |
444 | cputime64_t user, nice, system, idle, iowait, irq, softirq, steal; | 445 | cputime64_t user, nice, system, idle, iowait, irq, softirq, steal; |
445 | u64 sum = 0; | 446 | u64 sum = 0; |
447 | struct timespec boottime; | ||
446 | 448 | ||
447 | user = nice = system = idle = iowait = | 449 | user = nice = system = idle = iowait = |
448 | irq = softirq = steal = cputime64_zero; | 450 | irq = softirq = steal = cputime64_zero; |
449 | jif = - wall_to_monotonic.tv_sec; | 451 | getboottime(&boottime); |
450 | if (wall_to_monotonic.tv_nsec) | 452 | jif = boottime.tv_sec; |
451 | --jif; | ||
452 | 453 | ||
453 | for_each_possible_cpu(i) { | 454 | for_each_possible_cpu(i) { |
454 | int j; | 455 | int j; |