procfs: do not confuse jiffies with cputime64_t
[pandora-kernel.git] / fs / proc / stat.c
index 2a30d67..0855e6f 100644 (file)
@@ -32,7 +32,7 @@ static cputime64_t get_idle_time(int cpu)
                idle = kstat_cpu(cpu).cpustat.idle;
                idle = cputime64_add(idle, arch_idle_time(cpu));
        } else
-               idle = nsecs_to_jiffies64(1000 * idle_time);
+               idle = usecs_to_cputime64(idle_time);
 
        return idle;
 }
@@ -46,7 +46,7 @@ static cputime64_t get_iowait_time(int cpu)
                /* !NO_HZ so we can rely on cpustat.iowait */
                iowait = kstat_cpu(cpu).cpustat.iowait;
        else
-               iowait = nsecs_to_jiffies64(1000 * iowait_time);
+               iowait = usecs_to_cputime64(iowait_time);
 
        return iowait;
 }