diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-10-25 12:30:53 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-10-25 12:30:53 -0400 |
commit | 0b9e31e9264f1bad89856afb96da1688292f13b4 (patch) | |
tree | 7a9e9b6456dce993efeed8734de0a15a1f16ae94 /fs/proc/uptime.c | |
parent | cf82ff7ea7695b0e82ba07bc5e9f1bd03a74e1aa (diff) | |
parent | 964fe080d94db82a3268443e9b9ece4c60246414 (diff) |
Merge branch 'linus' into sched/core
Conflicts:
fs/proc/array.c
Merge reason: resolve conflict and queue up dependent patch.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/proc/uptime.c')
-rw-r--r-- | fs/proc/uptime.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/proc/uptime.c b/fs/proc/uptime.c index 0c10a0b3f146..766b1d456050 100644 --- a/fs/proc/uptime.c +++ b/fs/proc/uptime.c | |||
@@ -4,13 +4,18 @@ | |||
4 | #include <linux/sched.h> | 4 | #include <linux/sched.h> |
5 | #include <linux/seq_file.h> | 5 | #include <linux/seq_file.h> |
6 | #include <linux/time.h> | 6 | #include <linux/time.h> |
7 | #include <linux/kernel_stat.h> | ||
7 | #include <asm/cputime.h> | 8 | #include <asm/cputime.h> |
8 | 9 | ||
9 | static int uptime_proc_show(struct seq_file *m, void *v) | 10 | static int uptime_proc_show(struct seq_file *m, void *v) |
10 | { | 11 | { |
11 | struct timespec uptime; | 12 | struct timespec uptime; |
12 | struct timespec idle; | 13 | struct timespec idle; |
13 | cputime_t idletime = cputime_add(init_task.utime, init_task.stime); | 14 | int i; |
15 | cputime_t idletime = cputime_zero; | ||
16 | |||
17 | for_each_possible_cpu(i) | ||
18 | idletime = cputime64_add(idletime, kstat_cpu(i).cpustat.idle); | ||
14 | 19 | ||
15 | do_posix_clock_monotonic_gettime(&uptime); | 20 | do_posix_clock_monotonic_gettime(&uptime); |
16 | monotonic_to_bootbased(&uptime); | 21 | monotonic_to_bootbased(&uptime); |